Change of behavior after update to 24.9

We are checking, if we can upgrade from 21.4 to 24.9. Now we are facing some issues with reading mail address from an msg file. Code looks like this:
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(“Test Mail.msg”)
MailMessage mailMessage = MailMessage.Load(lMedium.MediaStream);
string mailAddress = mailMessage .Address;

With old version, we got this result:
mailAddress => patrick.ulrich@tcgprocess.com

with version 24.9:
mailAddress => “”

Is there an other way how to do get the same result with v24.9?

Test Mail.zip (12.0 KB)

Hi @patrick.ulrich
This is not a bug but a new correct behavior. In the original msg file the address is stored in Exchange format which does not make sense for MIME. To get the SMTP address use the KeepOriginalEmailAddresses option like this:

            MsgLoadOptions options = new MsgLoadOptions();
            options.KeepOriginalEmailAddresses = true;
            MailMessage eml = MailMessage.Load(stream, options);
            string address = eml.From.Address;

Thx a lot, will check that out.

You’re welcome!
If you have any further questions, feel free to ask.