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

 

 

 

 

 

 

Send Multipart/Alternative Email

Download Chilkat .NET for 4.0 Framework

Download Chilkat .NET for 64-bit 4.0 Framework (x64)

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 64-bit 2.0 / 3.5 Framework (x64)

Download Chilkat .NET for 1.0 / 1.1 Framework

This example program shows how to send a multiplart/alternative email.

	// Create a mailman object for sending email.
	Chilkat.MailMan mailman = new Chilkat.MailMan();

	// Any string argument automatically begins the 30-day trial.
	mailman.UnlockComponent("30-day trial");

	// Set the SMTP server host.
	mailman.SmtpHost = "smtp.earthlink.net";

	// Create a simple multipart/alternative email.
	Chilkat.Email email = new Chilkat.Email();

	email.Body = "This is the plain-text alternative";
	email.AddHtmlAlternativeBody("<html><body><b><font color='red' size='+1'>This is the HTML alternative body</font></b></html>");
	email.Subject = "This is a simple multipart/alternative email";
	email.AddTo("Chilkat Support","support@chilkatsoft.com");
	email.From = "Buddahead <buddahead@chilkatsoft.com>";

	// If you're curious, show the MIME text of the email to be sent..
	MessageBox.Show(email.GetMime());
	
	// Send email.
	bool success;
	success = mailman.SendEmail(email);
	if (success)
	{
		MessageBox.Show("Sent HTML mail!");
	}
	else
	{
		MessageBox.Show(mailman.LastErrorText);
	}

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