0
我想發送郵件,所以我寫了一個方法在handler.ashx但我得到錯誤,因爲如何使用處理程序發送郵件?
「SendUsing」配置值無效。這是什麼意思,請幫助我
public bool Sendmail() { bool strResult = false; 嘗試 {
email.Subject = " Registration";
email.To = "[email protected]";
email.From = "[email protected]";
email.Cc = "[email protected]";
email.Bcc = "[email protected]";
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("[email protected]", "Ticket Upload Batch Error",
// ex.ToString());
strResult = false;
}
return strResult;
}