VBScript Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP 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

 

 

 

 

 

 

 

Access Attached Message (Embedded Email)

Download Chilkat Email ActiveX

How to access an email embedded within another email (i.e. an attached message).

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

set email = CreateObject("Chilkat.Email2")

'  Load an email from a .eml

success = email.LoadEml("embeddedEmail.eml")
If (success <> 1) Then
    MsgBox email.LastErrorText
    WScript.Quit
End If

'  Display how many attached emails are embedded within
'  this one:

numAttached = email.NumAttachedMessages
MsgBox numAttached

'  Get the 1st attached message.

Set email2 = email.GetAttachedMessage(0)
If (Not (email2 Is Nothing )) Then

    '  Display the subject, From, and a header field...
    outFile.WriteLine(email2.Subject)
    outFile.WriteLine(email2.From)
    outFile.WriteLine(email2.GetHeaderField("X-SOMETHING"))
End If


outFile.Close

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

Mail Component · XML Parser