configuring smtp mailSettings
How do i configure smtp mailsettings in web.config?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Milton SmithPosted May 16, 2008, 6:18 PM
Niradhip ChakrabortyPosted May 16, 2008, 6:14 PM
Please add the namespace
using System.Net.Mail;
Milton SmithPosted May 16, 2008, 6:11 PM
Niradhip ChakrabortyPosted May 16, 2008, 6:02 PM
string
strFrom = null;strFrom ="
[email protected]";strTo= " [email protected]";
MailMessage mlMsg = new MailMessage(strTo, strFrom);
mlMsg.Subject = "Request for the Information";
SmtpClient emailClient = new SmtpClient();emailClient.Send(mlMsg);
Milton SmithPosted May 16, 2008, 5:58 PM
Niradhip ChakrabortyPosted May 16, 2008, 5:52 PM
change the host name username and password as per your need.