VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB.NET Examples

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

More Examples...
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

Access Attached Message (Embedded Email)

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

Download Chilkat .NET for 2.0 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

Dim email As New Chilkat.Email()

'  Load an email from a .eml
Dim success As Boolean
success = email.LoadEml("embeddedEmail.eml")
If (success <> true) 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 Chilkat.Email
email2 = email.GetAttachedMessage(0)
If (Not (email2 Is Nothing )) Then

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




 

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

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

Mail Component · XML Parser