We are using Aspose.Email.dll ver. 22.8 to parse email metadata as follows:
var options = options = new MsgLoadOptions();
var message = MailMessage.Load("test.msg", options);
var fromAddress = message.From.Address;
In Aspose.Email.dll ver. 20.4, which we were using before upgrading to 22.8, the Address property was filled. Now, it is empty for the same (locally sent with Exchange) email.
It is to inform you that the issue you are facing is not a bug in Aspose.Email. It is expected behavior. The original message contains an address in Exchange format that does not make sense in a MailMessage (EML format). We cannot change the behavior because other users will have problems, but you can use following code example to achieve your requirement.
var msg = MapiMessage.Load("test.msg");
var options = new MailConversionOptions();
if (msg.SenderAddressType == "EX")
options.KeepOriginalEmailAddresses = true;
var eml = msg.ToMailMessage(options);
var fromAddress = eml.From.Address;
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.