C# Examples

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

C# Examples

Bounced Mail
Bz2
Character Encoding
CSV
DKIM / DomainKey
Digital Certificates
Digital Signatures
Email
Email Object
FTP
HTML Conversion
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...
Amazon S3
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

Extract DSN Attached Message as Email Object

Download: Chilkat .NET Assemblies

C# code showing how to extract an attached message from a DSN as an email object.

// Unlock the component
Chilkat.MailMan mailman0 = new Chilkat.MailMan();
mailman0.UnlockComponent("30-day trial");

// Load a .eml file into the email object.
// A zip containing 10 DSN sample emails can be found at:
// http://www.chilkatsoft.com/dsn_samples/DSN_Samples.zip
Chilkat.Email email = new Chilkat.Email();
email.LoadEml("dsnSample1.eml");

// The email should be a multipart/report.  If not, exit.
if (!email.IsMultipartReport()) 
{
    MessageBox.Show("Not a DSN!");
    return;
}	

// There is usually an attached message.
Chilkat.Email email2 = email.GetAttachedMessage(0);
if (email2 != null) 
{
    // Your application can now retrieve information from email2 just
    // like any other email object...
    MessageBox.Show(email2.GetHeaderField("Message-ID"));
    }
else
{
    MessageBox.Show("No attached message!");
    }

Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 

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