Sending Email
Configure the web.config file
<mailSettings > <smtp from="nratdot4prodotcom"> <network host="smtp.dot4pro.com" /> </smtp> </mailSettings>
Send the mail
Create an instance of SmtpClient object and send mail.
MailMessage message = new MailMessage();
message.From = new MailAddress("senderatdot4pro.com");
message.To.Add(new MailAddress("recipient1atdot4pro.com"));
message.To.Add(new MailAddress("recipient2atdot4pro.com"));
message.To.Add(new MailAddress("first1atgmaildotcom"));
message.CC.Add(new MailAddress("sendtoatgmaildotcom"));
message.Subject = "This is my subject";
message.Body = "This is the body. can be html body";
SmtpClient client = new SmtpClient();
client.Send(message);
Hope this helps to minimize the code while sending mails.






