Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Send Multipart/Alternative Email
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 |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.