Sending mail through Asp.net


Sending mail through Asp.net

Example of Sending mail through Asp.net


Import Namespace using System.Web.Mail;
//Create a object on MailMessage
MailMessage objMailMessage = new MailMessage();
//Mention the TO Address
objMailMessage.To = "mail1@gmail.com";
//Mention the From Address
objMailMessage.From = "mail2@gmail.com";
//Subject of the mail
objMailMessage.Subject = "Hi";
//Body of the mail
objMailMessage.Body = "Hello how are u ,Thank u";
//mail format
objMailMessage.BodyFormat = MailFormat.Html;
//SmtpMail.SmtpServer = "206.190.60.37";
SmtpMail.Send(objMailMessage);


Related Articles

Read Mails from ASP.NET

This article Illustrate How to read mails from ASP.Net. Using POP commands you can access you email inbox from ASP.Net. Basic POP commands are USER, PASS, LIST, QUIT, RETR.

SilverPop Integration

SilverPop is a third party emailing tool which is not only provide the facility to prepare the email templates which needs to be used in sending an email as well as it provides the support for campaign management through various things.

More articles: Sending Email Email ASP.Net Email using c# Email

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: