Beispiel #1
0
        public void RichTextRoundTrip()
        {
            Email email = new Email();
            email.SetTextBody("{\\rtf1hello world", System.Net.Mime.MediaTypeNames.Text.RichText);
            email.AddDataAttachment("foobar", Properties.Resources.boot);
            string mimetext = email.GetMime();

            Email another = new Email();
            another.SetFromMimeText(mimetext);
            another.SetTextBody("{\\rtf1hello world", System.Net.Mime.MediaTypeNames.Text.RichText);
            another.DropAttachments();
            another.AddDataAttachment("foobar", Properties.Resources.boot);
            string aftermimetext = another.GetMime();

            Assert.AreEqual(email.NumAttachments, another.NumAttachments, "Expecting number of attachments to be the same");
        }