MailMessage myMail = new MailMessage();
myMail.From = "[email protected]";
myMail.To = "[email protected]";
myMail.Subject = "UtilMailMessage001";
myMail.Priority = MailPriority.Low;
myMail.BodyFormat = MailFormat.Html;
myMail.Body = "<html><body>UtilMailMessage001 - success</body></html>";
MailAttachment myAttachment = new MailAttachment("c:\attach\attach1.txt", MailEncoding.Base64);//粘贴附件
myMail.Attachments.Add(myAttachment);
SmtpMail.SmtpServer = "MyMailServer";
SmtpMail.Send(myMail);
myMail.From = "[email protected]";
myMail.To = "[email protected]";
myMail.Subject = "UtilMailMessage001";
myMail.Priority = MailPriority.Low;
myMail.BodyFormat = MailFormat.Html;
myMail.Body = "<html><body>UtilMailMessage001 - success</body></html>";
MailAttachment myAttachment = new MailAttachment("c:\attach\attach1.txt", MailEncoding.Base64);//粘贴附件
myMail.Attachments.Add(myAttachment);
SmtpMail.SmtpServer = "MyMailServer";
SmtpMail.Send(myMail);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货