How to send mail using SMTP Mail in asp.net — ASP.Net , C Sharp , Mail Service — ASP.Net Example
ASP.Net Example-How to send mail using SMTP Mail in asp.net

Friday, February 17, 2012

How to send mail using SMTP Mail in asp.net

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

No comments:

Post a Comment

ASPdotNET-Example