我有以下代码:
using System.Web.Mail;
MailMessage myMail = new MailMessage();
myMail.From = "anitha.anba@gmail.com";
myMail.To = "ani2devi@yahoo.co.in";
myMail.Body = "<html><body>success</body></html>";
myMail.Subject = "checkmail";
SmtpMail.SmtpServer = "mymailserver";
SmtpMail.Send(myMail);
SmtpMail中显示错误。是否需要任何头文件?如果是这样,有人可以列出他们吗?