Wednesday, April 16, 2008

Simple Mailing

1.1-System.Web.Mail
2.0-system.net.mail

-----------------------------------------------
2.0
string AdminEmailId = System.Configuration.ConfigurationSettings.AppSettings["Conn"];
------------------------
string AdminEmailId = ConfigurationSettings.AppSettings["AdminEmailId"];
MailMessage strmail = new MailMessage();
strmail.To = AdminEmailId;
strmail.From = txtEmail.Text;
strmail.Body = ("

Hi,

The below are the details of person who is looking for a job.

" + (BodyString + "

Thanks."));
strmail.BodyFormat = MailFormat.Html;
strmail.Subject = "Hai";
System.Web.Mail.SmtpMail.Send(strmail);

No comments: