SmtpMail

SmtpMail

System.Web.Mail (system.web.dll)class

The SmtpMail class represents the SMTP Server. It includes a static Send( ) method that you can use to send email programmatically. There are two versions of the Send( ) method: one accepts a MailMessage object, and the other provides a quick and simple way to send an email message without creating a MailMessage instance (by specifying the sender's email address, the recipient, the subject, and the body text as string parameters). Before sending a message, set the static SmtpServer with the name of IP address of the mail server (use "localhost" for the current computer).

public class SmtpMail { // Public Static Properties    public static string SmtpServer{set; get; } // Public Static Methods    public static void Send(MailMessage message);    public static void Send(string from, string to, string subject, string messageText); }


ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net