急!smtp问题
我的代码:
应该没错吧!怎么会??
protected void send_message(object sender, System.EventArgs e)
{
System.Web.Mail.MailMessage mailMessage = new System.Web.Mail.MailMessage();
mailMessage.From = "hanhans@21cn.com";
mailMessage.To = "hanhans@21cn.com";
mailMessage.Subject = "Email Subject";
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text;
System.Web.Mail.SmtpMail.SmtpServer = "stmp.sohu.com";
System.Web.Mail.SmtpMail.Send(mailMessage);
}