i want to send mail so i wrote one method in handler.ashx but i got error as
The “SendUsing” configuration value is invalid. what does it mean pls help me
public bool Sendmail()
{
bool strResult = false;
try
{
email.Subject = " Registration";
email.To = "ravivarma_07d@yahoo.com";
email.From = "giribhushan.svg@gmail.com";
email.Cc = "ravivarma_07d@yahoo.com";
email.Bcc = "ravivarma_07d@yahoo.com";
email.BodyFormat = MailFormat.Html;
email.Body = "<html>" +
"<body>" +
"<b>Hi ravi</b>"+
"</body>" +
"</html>";
email.Priority = MailPriority.Normal;
SmtpMail.Send(email);
strResult = true;
}
catch (Exception ex)
{
//FTEHelper.SendEmail("ticketupload@whohastwo.com", "Ticket Upload Batch Error",
// ex.ToString());
strResult = false;
}
return strResult;
}
You should specify an SMTP server.
Also you should consider using System.Net.Mail namespace instead of System.Web.Mail. (If you aren’t forced to use .NET 1, of course.)