2
Contributors
1
Reply
2
Views
12 Years
Discussion Span
Last Post by v_ashwani
0

hey,

if you are sending emails using ASP.NET, then you need not worry about anything extra..just use the System.Web.Mail namespace, every setting is present there..for example look at this code below:

string MailServer=""; //Your mail server name
System.Web.Mail.MailMessage SendMail = new System.Web.Mail.MailMessage(); //create a new mail message SendMail.BodyEncoding=System.Text.Encoding.UTF8; //set encoding
SendMail.BodyFormat=System.Web.Mail.MailFormat.Html; //set Format..There are HTML and Text formats available
SendMail.To=mailTo; //to
SendMail.From=mailFrom; //from
SendMail.Subject=subject;//subject

SendMail.Body=mailBody; //mail Body..The complete HTML string of page
SendMail.Cc = mailCC;//CC
SendMail.Bcc = mailBCC;//BCC
System.Web.Mail.SmtpMail.SmtpServer=MailServer;//set mail server
System.Web.Mail.SmtpMail.Send(SendMail); //send email

Hope this helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.