浏览我们的产品

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.

 

Aspose.Email for .NET 22.2.0

下载  支持论坛 

文件详情

  • 下载:
  • 18
  • 文件大小:
  • 51.7 MB
  • Posted By:
  • DmitryS
  • 浏览量:
  • 60
  • 添加日期:
  • 2/28/2022

文件详情

通过 API 更好地处理 TNEF

以前在某些情况下,TNEF(传输中性封装格式)电子邮件附件格式存在纯文本正文问题。此问题已在当前版本的 API 中得到解决。

// The path to the File directory.
string dataDir = RunExamples.GetDataDir_Email();

MsgLoadOptions options = new MsgLoadOptions();
options.PreserveTnefAttachments = true;
MailMessage eml = MailMessage.Load(dataDir + "EmbeddedImage1.msg", options);
foreach (Attachment attachment in eml.Attachments)
{
    Console.WriteLine(attachment.Name);
}

参考附件支持

API 中已实现对参考附件的支持。如果您想更好地控制对附件的访问,则最好使用参考附件来代替本地文件附件。

var eml = MailMessage.Load("fileName");

var refAttach = new ReferenceAttachment("https://[attach_uri]")
{
    Name = "Document.docx",
    ProviderType = AttachmentProviderType.OneDrivePro,
    PermissionType = AttachmentPermissionType.AnyoneCanEdit
};

eml.Attachments.Add(refAttach);

改进了对 EML 到 PST 转换的支持

在之前的一些实例中,观察到当“EML”文件从“PST”转换时,电子邮件的参考附件没有显示。现在这个问题已经解决了。

以下 C# 代码片段演示了通过 API 进行简单的 EMLPST 格式转换:

using (var message = MailMessage.Load("sourceFile.eml")){
    using (var personalStorage = PersonalStorage.Create("outputFile.pst", FileFormatVersion.Unicode)){

        var inbox = personalStorage.RootFolder.AddSubFolder("Inbox");

        inbox.AddMessage(MapiMessage.FromMailMessage(message, MapiConversionOptions.UnicodeFormat));
	}
}

有关此版本中的功能、增强功能和错误修复的完整列表,请访问 Aspose.Email for .NET 22.2 Release Notes

 简体中文