VBScript Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VBScript Examples

Bounced Mail
Bz2
Character Encoding
Digital Certificates
CSV
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
Byte Array
RSS
Atom
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

(VBScript) Connecting to GMAIL using IMAP

Demonstrates how to connect to GMAIL using IMAP.

Download 32-bit Chilkat IMAP ActiveX (.msi)

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)


set imap = CreateObject("Chilkat.Imap")

'  Anything unlocks the component and begins a fully-functional 30-day trial.
success = imap.UnlockComponent("Anything for 30-day trial")
If (success <> 1) Then
    outFile.WriteLine(imap.LastErrorText)
    WScript.Quit
End If

'  Turn on session logging:
imap.KeepSessionLog = 1

'  Connect to GMail
'  Chilkat automatically recognizes "imap.gmail.com" and,
'  because it's so common, automatically sets the port = 993
'  and uses a secure SSL/TLS connection.
success = imap.Connect("imap.gmail.com")
If (success <> 1) Then
    outFile.WriteLine(imap.LastErrorText)
    WScript.Quit
End If

'  Login
'  Your login is typically your GMail email address.
success = imap.Login("username@gmail.com","myPassword")
If (success <> 1) Then
    outFile.WriteLine(imap.LastErrorText)
    WScript.Quit
End If

'  Select an IMAP mailbox
success = imap.SelectMailbox("Inbox")
If (success <> 1) Then
    outFile.WriteLine(imap.LastErrorText)
    WScript.Quit
End If

'  Show the session log.
outFile.WriteLine(imap.SessionLog)

'  Disconnect from the IMAP server.
imap.Disconnect 


outFile.Close

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