Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Tcl Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(Tcl) IMAP using HTTP Proxy

Demonstrates how to connect to an IMAP server through an HTTP proxy.

Chilkat Tcl Extension Downloads

Chilkat Tcl Extension Downloads

load ./chilkat.dll

set imap [new_CkImap]

#  Anything unlocks the component and begins a fully-functional 30-day trial.
set success [CkImap_UnlockComponent $imap "Anything for 30-day trial"]
if {[expr $success != 1]} then {
    puts [CkImap_lastErrorText $imap]
    delete_CkImap $imap
    exit
}

#  To connect through an HTTP proxy, set the HttpProxyHostname
#  and HttpProxyPort properties to the hostname (or IP address)
#  and port of the HTTP proxy.  Typical port numbers used by
#  HTTP proxy servers are 3128 and 8080.
CkImap_put_HttpProxyHostname $imap "www.myhttpproxy.com"
CkImap_put_HttpProxyPort $imap 3128

#  Important:  Your HTTP proxy server must allow non-HTTP
#  traffic to pass.  Otherwise this does not work.

#  Connect to an IMAP server through the HTTP proxy.
#  Use TLS
CkImap_put_Ssl $imap 1
CkImap_put_Port $imap 993
set success [CkImap_Connect $imap "imap.someMailServer.com"]
if {[expr $success != 1]} then {
    puts [CkImap_lastErrorText $imap]
    delete_CkImap $imap
    exit
}

#  ...
#  ...

delete_CkImap $imap

 

© 2000-2019 Chilkat Software, Inc. All Rights Reserved.