MailMessage mailMsg = new MailMessage();
MailAttachment ma = new MailAttachment("d://1.jpg");
mailMsg.BodyFormat = MailFormat.Html;
mailMsg.To = "[email protected]";
mailMsg.From = "[email protected]";
mailMsg.Subject = "email.Subject";
mailMsg.Body = "email.Body";
mailMsg.BodyFormat = MailFormat.Text;
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "renzhijie1990");
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "**********");
mailMsg.Attachments.Add(ma);
//
SmtpMail.SmtpServer = "smtp.qq.com";
SmtpMail.Send(mailMsg);为什么发送不出去??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货