Tuesday, August 6, 2013

MAIL send from ASP.net C#

Here is a simple example for MAIL sending from ASP.net and C#

Hope it will help you



private void MAILSEND(string strDecision)
    {
        SmtpClient smtp = new SmtpClient();
        MailMessage mail = new MailMessage();

        mail.From = new MailAddress(Originator_mail address);
        mail.To.Add(mail_address);

mail.Subject ="Subject";
       mail.Body="Body";
smtp.Host ="Host_Addr";
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtp.Port = 25;
            smtp.Send(mail)
}