Aspose.Email for .NET 23.3 Release Notes

All Changes

KeySummaryCategory
EMAILNET-40797Add property GetTotalItemsCount in OlmStorageFeature
EMAILNET-40881Detect either MapiMessage is OFT or MSGFeature
EMAILNET-40912Detect NSF File FormatFeature
EMAILNET-40981VCardContact.LoadAsMultiple not returns property valuesEnhancement
EMAILNET-40974At loading from emlx and saving to html some LF separators included in out fileBug
EMAILNET-40954Fetch Messages from iCloud IMAP Server FailedBug
EMAILNET-40971Body content missingBug
EMAILNET-40990FormatException BugBug
EMAILNET-40986Error parsing EMLBug
EMAILNET-40996MapiMessageItem Save IssueBug
EMAILNET-40958MapiContact not honouring MAPI properties when generating MIMEBug
EMAILNET-40955Bug in Msg and Oft: duplicate attachmentsBug
EMAILNET-40985TemplateEngine replaces all occurences of the variable name even if it is not a variableBug
EMAILNET-41005Problem with the attachment-filename of a signed emailBug
EMAILNET-40997MailMessage AlternativeView part duplicates message headers after reloadingBug
EMAILNET-40935XMailer field does not set sometimesBug
EMAILNET-40710FETCH Message via IMAP, use BODY[] rather than RFC822Bug

New Features

Provide method to get Get Total Items Count of OlmStorage

We have added the GetTotalItemsCount() method to OlmStorage class. It returns the total number of message items contained in the OLM storage.

Code example:

using (OlmStorage olm = new OlmStorage("storage.olm"))
{
    var count = olm.GetTotalItemsCount();
}

How to determine if MapiMessage is OFT or MSG

OFT (Outlook File Template) file is an email template created by Microsoft Outlook. MapiMessage also supports loading it using the Load method. But having a MapiMessage object it is difficult to determine whether it was loaded from an OFT or MSG file, as OFT file format uses the MSG file format at its base. We have added the MapiMessage.IsTemplate property, which allows us to determine whether the MapiMessage was loaded from an OFT or MSG file.

Code example:

var msg = MapiMessage.Load("message.msg");
var isOft = msg.IsTemplate; // returns false

var msg = MapiMessage.Load("message.oft");
var isOft = msg.IsTemplate; // returns true

Also, we have added a new ways to save MapiMessage or MailMessage in OFT format, with using SaveOptions:

// Save the MailMessage to OFT format
using (var eml = MailMessage.Load("message.eml"))
{
    eml.Save("message.oft", SaveOptions.DefaultOft);
	
	// or alternative way #2
	var saveOptions = new MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormat);
    eml.Save("message.oft", saveOptions);
	
	// or alternative  way #3
	saveOptions = SaveOptions.CreateSaveOptions(MailMessageSaveType.OutlookTemplateFormat);
    eml.Save("message.oft", saveOptions);

}

// Save the MapiMessage to OFT format
using (var msg = MapiMessage.Load("message.msg"))
{
    msg.Save("message.oft", SaveOptions.DefaultOft);
	
	// or alternative way #2
	var saveOptions = new MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormat);
    msg.Save("message.oft", saveOptions);
	
	// or alternative  way #3
	saveOptions = SaveOptions.CreateSaveOptions(MailMessageSaveType.OutlookTemplateFormat);
    msg.Save("message.oft", saveOptions);
}

Detect an NSF File Format

We have added a feature to recognize the NSF file format:

var formatType = FileFormatUtil.DetectFileFormat("storage.nsf").FileFormatType; // Returns FileFormatType.Nsf