Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Unicode
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor


VB Strings
VB Byte Array

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

Access Attached Message (Embedded Email)

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

Download Chilkat Email ActiveX for POP3 / SMTP

Download Chilkat IMAP ActiveX

Dim email As New ChilkatEmail2

'  Load an email from a .eml
Dim success As Long
success = email.LoadEml("embeddedEmail.eml")
If (success <> 1) Then
    MsgBox email.LastErrorText
    Exit Sub
End If

'  Display how many attached emails are embedded within
'  this one:
Dim numAttached As Long
numAttached = email.NumAttachedMessages
MsgBox numAttached

'  Get the 1st attached message.
Dim email2 As ChilkatEmail2
Set email2 = email.GetAttachedMessage(0)
If (Not (email2 Is Nothing )) Then

    '  Display the subject, From, and a header field...
    Text1.Text = Text1.Text & email2.Subject & vbCrLf
    Text1.Text = Text1.Text & email2.From & vbCrLf
    Text1.Text = Text1.Text & email2.GetHeaderField("X-SOMETHING") & vbCrLf
End If


Need a specific example? Send a request to support@chilkatsoft.com

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