使用LumiSoft.Net,下载地址见http://www.lumisoft.ee/lswww/download/downloads/Net/
// Creating a new simple message Mime m = new Mime(); MimeEntity mainEntity = m.MainEntity; // Force to create From: header field mainEntity.From = new AddressList(); mainEntity.From.Add(new MailboxAddress("dispaly name", "[email protected]")); // Force to create To: header field mainEntity.To = new AddressList(); mainEntity.To.Add(new MailboxAddress("dispaly name", "[email protected]")); mainEntity.Subject = "subject"; mainEntity.ContentType = MediaType_enum.Text_plain; mainEntity.ContentTransferEncoding = ContentTransferEncoding_enum.QuotedPrintable; mainEntity.DataText = "Message body text.";
m.ToFile("e://message.eml");
大家有没有更好的生成eml的方法?请留言
|
请发表评论