Provides properties and methods for constructing an e-mail message. Recommended alternative: System.Net.Mail.
See Also: MailMessage Members
C# Example
using System; using System.Web.Mail; class SmtpExample { public static void Main(string[] args) { // Construct message MailMessage msg= new MailMessage(); msg.From = "mono@example.com"; msg.To = "howard.cole@example.com"; msg.Subject = "An example email"; msg.Body = "<strong>This<strong> is an example of an HTML email.<p><pre>OK!</pre></p>" msg.BodyFormat = MailFormat.Html; // Send via SMTP server SmtpMail.SmtpServer="smtp.example.com"; SmtpMail.Send(msg); } }