Click to get Flash Player
Get Adobe Flash player

or try to enable JavaScript and reload the page

Sunday 13 March 2011

Simple Email csharp program

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

No comments:

Post a Comment

thnx