Mail Test : Mail « Network « C# / C Sharp






Mail Test

  

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);
   }
}


           
         
    
  








Related examples in the same category

1.SmtpClient: From, Subject, Body, Attachments, To
2.A POP3 e-mail checkerA POP3 e-mail checker
3.Fancy Mail Test
4.Mail Attach Test
5.Send Email
6.Send HTML Mail
7.Is Valid Email
8.Is Valid Email Address
9.Is Email
10.Sends a MailMessage object using the SMTP settings.
11.Smtp Send