Simplest Way of Sending Email
try
{
SmtpClient smtpMailObj = new SmtpClient();
//eg:localhost, 192.168.0.x, replace
//with your server name
smtpMailObj.Host = "myMailServer";
smtpMailObj.Send(txtFrom.Text, txtTo.Text,
txtSubject.Text, txtComment.Text);
Response.Write("Your Message has been
sent successfully");
}
catch (Exception ex)
{
Response.Write("Message Delivery Fails");
}
No comments:
Post a Comment