C# Examples

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

 

 

 

 

 

 

User-Defined (Custom) Email Header Fields

Download: Chilkat .NET Assemblies

This example shows how to add custom header fields to your email messages.

// The Email.AddHeaderField can be used to add custom header fields
// to an email, or to replace existing header fields.  If a header field with
// the same name already exists, AddHeaderField will replace it.
        private void AddCustomHeaderFields(Chilkat.Email email)
        {
            // In this example, I'll prefix the custom fields with "X-".
            // Custom header field names must follow this rule:
            // 1*<any CHAR, excluding CTLs, SPACE, and ":">
            // In plain English: The field name must be 1 or more characters,
            // and cannot include control chars, SPACE, or ":".
            email.AddHeaderField("X-Company", "Chilkat Software");
            email.AddHeaderField("X-Regarding", "Example Code");

            // There is a special email header field prefix
            // that can be used with Chilkat email: "CKX-"
            // Any header field beginning with the prefix "CKX-" is automatically
            // removed from the email during the sending process.  (Except when
            // sending MIME via SendMime.)
            // This allows you to embed meta-data with your email and save the MIME
            // to a file or to your database.  For example:
            email.AddHeaderField("CKX-Customer-ID", "1234");
            email.SaveEml("customer.eml");

        }


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-2012 Chilkat Software, Inc. All Rights Reserved.

Email Component · XML Parser