public MailMessage()
 {
     Recipients  = new List <string>();
     Attachments = new MailAttachments();
     BodyFormat  = MailFormat.Text;
     Priority    = MailPriority.Normal;
     Charset     = "GB2312";
 }
 public MailMessage()
 {
     Recipients = new List<string>();
     Attachments = new MailAttachments();
     BodyFormat = MailFormat.Text;
     Priority = MailPriority.Normal;
     Charset = "GB2312";
 }
Beispiel #3
0
 public void TestMailAttachments()
 {
     var attachments = new MailAttachments();
     Assert.AreEqual(0, attachments.Count, "初始化MailAttachments");
     attachments.Add("c:\\autoexec.bat");
     Assert.AreEqual(1, attachments.Count, "增加附件(附件确实存在)");
     attachments.Add("c:\\autoexec.dat.txt");
     Assert.AreEqual(1, attachments.Count, "增加附件(附件不存在)");
     attachments.Clear();
     Assert.AreEqual(0, attachments.Count, "清除附件");
 }