How to send mail using SMTP Server



using System;
using System.Web.Mail;

public class SmtpMailExample
{
public static void Main()
{
string FromSMTP = "from@asp.net";
string ToSMTP = "to@smtp.net";
string SubjectSMTP = "This is a SMTP Test Mail Example Message";
string BodySMTP = "Hi .";

SmtpMail.SmtpServer = "192.168.1.151";
SmtpMail.Send(FromSMTP, ToSMTP, SubjectSMTP, BodySMTP);
}
}

Comments

Popular posts from this blog

How to find client's MAC Address in Asp.Net and C#.net

ASP.NET Session States in SQL Server Mode

Use XML Data For Save in Database