public void TestSwedishAndChineseCombination() { hMailServer.Account account = SingletonProvider <Utilities> .Instance.AddAccount(_domain, "*****@*****.**", "test"); string swedishAndChinese = "ÅÄÖ汉语"; string attachmentName = swedishAndChinese + ".zip"; string filename = Path.Combine(Path.GetTempPath(), attachmentName); File.WriteAllText(filename, swedishAndChinese); hMailServer.Message message = new hMailServer.Message(); message.AddRecipient("test", account.Address); message.From = "Test"; message.FromAddress = account.Address; message.Body = swedishAndChinese; message.Attachments.Add(filename); message.Save(); Utilities.AssertMessageExistsInFolder(account.IMAPFolders[0], 1); hMailServer.Message downloadedMessage = account.IMAPFolders[0].Messages[0]; Assert.AreNotEqual(0, downloadedMessage.Attachments.Count); hMailServer.Attachment attachment = downloadedMessage.Attachments[0]; Assert.AreEqual(attachmentName, attachment.Filename); Assert.AreEqual(swedishAndChinese + Environment.NewLine, downloadedMessage.Body); }
public void TestJapaneseAttachments() { hMailServer.Account account = SingletonProvider <Utilities> .Instance.AddAccount(_domain, "*****@*****.**", "test"); string attachmentName = "本本本.zip"; string filename = Path.Combine(Path.GetTempPath(), attachmentName); File.WriteAllText(filename, "tjena moss"); hMailServer.Message message = new hMailServer.Message(); message.AddRecipient("test", account.Address); message.From = "Test"; message.FromAddress = account.Address; message.Body = "hejsan"; message.Attachments.Add(filename); message.Save(); Utilities.AssertMessageExistsInFolder(account.IMAPFolders[0], 1); hMailServer.Message downloadedMessage = account.IMAPFolders[0].Messages[0]; Assert.AreNotEqual(0, downloadedMessage.Attachments.Count); hMailServer.Attachment attachment = downloadedMessage.Attachments[0]; Assert.AreEqual(attachmentName, attachment.Filename); }
internal Attachment(hMailServer.Attachment o) { _object = o; }
internal Attachment(hMailServer.Attachment o) { _object = o; }