Sends an e-mail message using the specified destination parameters. Recommended alternative: System.Net.Mail.
This is a method that sends an e-mail message over the SMTP protocol. It connects to the SMTP server as specified in SmtpMail.SmtpServer and sends the e-mail to to. This method is a simplified version of SmtpMail.Send(MailMessage) which is actually used by this method for sending e-mails.
Here is a simple example to show how to send an e-mail.
C# Example
using System;
using System.Web.Mail;
public class SmtpTest {
public static void Main (String[] args)
{
SmtpMail.SmtpServer = "mail.foo.bar";
SmtpMail.Send ("per@foo.bar","ola@foo.bar","Hello, E-Mail world!","This is a test mail.");
}
}