vs03发送邮件问题,提示发送成功,但邮箱里没收到,请高手指点迷津!
MailMessage mailMsg = new MailMessage();
mailMsg.BodyFormat = MailFormat.Html;
mailMsg.To = "[email protected]";
mailMsg.From = "[email protected]";
mailMsg.Subject = "haha";
mailMsg.Body = "eneennene";
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "52aspx");mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "5432668");
SmtpMail.SmtpServer="[email protected]";
try
{
SmtpMail.Send(mailMsg);
this.Label1.Text = "发送成功";
}
catch (Exception err)
{
this.Label2.Text = "<font color=red>发送失败" + err.Message.ToString() + "</font>";
}
MailMessage mailMsg = new MailMessage();
mailMsg.BodyFormat = MailFormat.Html;
mailMsg.To = "[email protected]";
mailMsg.From = "[email protected]";
mailMsg.Subject = "haha";
mailMsg.Body = "eneennene";
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "52aspx");mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "5432668");
SmtpMail.SmtpServer="[email protected]";
try
{
SmtpMail.Send(mailMsg);
this.Label1.Text = "发送成功";
}
catch (Exception err)
{
this.Label2.Text = "<font color=red>发送失败" + err.Message.ToString() + "</font>";
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货