Csharp/C Sharp by API/System.Net.Mail/SmtpMail

Материал из .Net Framework эксперт
Версия от 15:12, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

SmtpMail.SmtpServer

<source lang="csharp"> using System; using System.Net; using System.Web.Mail; public class MailTest {

  public static void Main()
  {
     string from = "from@from.net";
     string to = "to@to.net";
     string subject = "This is a test mail message";
     string body = "Hi .";
     SmtpMail.SmtpServer = "192.168.1.150";
     SmtpMail.Send(from, to, subject, body);
  }

}


 </source>