11 Ağustos 2007 Cumartesi

Send a SMTP E-Mail

using System;
using System.Web.Mail;

namespace DevDistrict.Sample
{
public class SendMail
{
public void Send(string serverName, string to, string from, string subject)
{
SmtpMail.SmtpServer = serverName;

MailMessage m = new MailMessage();
m.To = to;
m.From = from;
m.Subject = subject;
m.Body = body;

SmtpMail.Send(m);
}
}
}


0 Comments: