Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Simple Send HTML Email
This is a very simple example showing how to send a basic HTML email in C#. // 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 hostname. mailman.SmtpHost = "smtp.earthlink.net"; // Create a simple HTML email. Chilkat.Email email = new Chilkat.Email(); email.SetHtmlBody("<html><body><b><font color='red' size='+1'>This is red bold text</font></b></html>"); email.Subject = "This is a simple HTML email"; email.AddTo("Chilkat Support","support@chilkatsoft.com"); email.From = "Jack Johnson <jj@chilkatsoft.com>"; // Send mail. 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 |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.