C# Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

C# Examples

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


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

 

 

 

 

 

 

Access Attached Message (Embedded Email)

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

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

Chilkat.Email email = new Chilkat.Email();

//  Load an email from a .eml
bool success;
success = email.LoadEml("embeddedEmail.eml");
if (success != true) {
    MessageBox.Show(email.LastErrorText);
    return;
}

//  Display how many attached emails are embedded within
//  this one:
int numAttached;
numAttached = email.NumAttachedMessages;
MessageBox.Show(Convert.ToString(numAttached));

//  Get the 1st attached message.
Chilkat.Email email2 = null;
email2 = email.GetAttachedMessage(0);
if (!(email2 == null )) {

    //  Display the subject, From, and a header field...
    textBox1.Text += email2.Subject + "\r\n";
    textBox1.Text += email2.From + "\r\n";
    textBox1.Text += email2.GetHeaderField("X-SOMETHING") + "\r\n";
}


 

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

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

Email Component · XML Parser