呵呵,不好意思又麻烦你啦! 我写了个邮件发送程序,没报错可好像也没成功阿?
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage msgMail = new MailMessage();
msgMail.To = "chenhongping520@163.com";
msgMail.Cc = "";
msgMail.From = "850525chp@mail.china.com";
msgMail.Subject = "ok??";
msgMail.BodyFormat = MailFormat.Html;
string strbody = "<html><body>节日快乐!</body></html>";
msgMail.Body = strbody;
SmtpMail.Send(msgMail);
Response.Write("成功发送!");
}
就这么点程序做个测试,是还需要什么吗?
还有我上次下了你的一个email例子,运行后怎么是“服务器连接失败!”,是要做什么修改吗?