C# Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



C# Examples

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


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

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

 

 

 

 

 

 

MIME Content Transfer Encoding - Base64, Quoted-Printable, 8bit

C# example program showing how to produce MIME using different content encodings.

// How to use different content-transfer-encodings
// such as quoted-printable, base64, and 8bit.
Chilkat.Mime mime = new Chilkat.Mime();
mime.UnlockComponent("anything for 30-day trial");
    
mime.Charset = "iso-8859-1";
// Begin with 8bit.
mime.Encoding = "8bit";

// Add some Danish text...
mime.SetBodyFromPlainText("Jeg kan spise glas, det gør ikke ondt på mig.");
    		
textBox1.Text = mime.GetMime();
    
/* This MIME is created:

content-transfer-encoding: 8bit
content-type: text/plain;
charset="iso-8859-1"

Jeg kan spise glas, det gør ikke ondt på mig.

*/

// Change the encoding to base64:
mime.Encoding = "base64";
textBox1.Text = mime.GetMime();

/* The MIME is now in base64 format:

content-type: text/plain;
charset="iso-8859-1"
content-transfer-encoding: base64

SmVnIGthbiBzcGlzZSBnbGFzLCBkZXQgZ/hyIGlra2Ugb25kdCBw5SBtaWcu

*/

// Change the encoding to quoted-printable:
mime.Encoding = "quoted-printable";
textBox1.Text = mime.GetMime();

/* The MIME is now in quoted-printable format:

content-type: text/plain;
charset="iso-8859-1"
content-transfer-encoding: quoted-printable

Jeg kan spise glas, det g=F8r ikke ondt p=E5 mig.

*/


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/csharp/step2.asp

 

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

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

Email Component · XML Parser