SmtpMail.Send Method (String, String, String, String)
.NET Framework 3.0
Sends an e-mail message using the specified destination parameters. Recommended alternative: System.Net.Mail.
Namespace: System.Web.Mail
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public static void Send ( String from, String to, String subject, String messageText )
public static function Send ( from : String, to : String, subject : String, messageText : String )
Not applicable.
Parameters
- from
The address of the e-mail sender.
- to
The address of the e-mail recipient.
- subject
The subject line of the e-mail message.
- messageText
The body of the e-mail message.
The following example shows how to send a simple message using SmtpMail.
String from = "from@microsoft.com";
String to = "to@microsoft.com";
String subject = "UtilMailMessage001";
String body = "UtilMailMessage001 - success";
SmtpMail.set_SmtpServer("MyMailServer");
SmtpMail.Send(from, to, subject, body);
Community Additions
ADD
Show: