Issue while fetching From address of shared mail ID(Distribution Lists)

Hi,

I am facing an issue while reading from address of a shared mail ID(sender),
However i am able to read subject,body of the same.

I have tried both item.from.address and item.sender.address, both are resulting in NullPointerException.

Working fine when i am fetching From address of a personal mail ID.

I am using Get Outlook mail messages and iterating using for loop

Kindly help me here, Thanks in advance

Hi @jeevan454,

have you tried “item.From.ToString”? Here “item” in For Each loop has a TypeArgument: System.Net.Mail.MailMessage. “item.From.address” works fine for me too.

Hi @PAD,

Thank you for reply.

item.From returning null for me while reading Shared Mail ID address.

from,subject,body are working while fetching for personal mail ids for me as well.

The issue is only when we are trying to get from address of shared account

Hi, @jeevan454
I came across a problem like this, and in fact that mail message did not have a from address to reply to.
Could you please check if this is the case?

Thank you

Hi @Andreia_Ciocanel

Thank you,
Yes we do have mail ID of that account, i can see that in header property as well of that mail item in outlook
and please let me know if we have any solution for these

Hi, @jeevan454

Could you please upload a sample of the header of the mail you can not retrieve the from address?
Thank you.

Kindy refer my ans for fetching all email from distribution list

Hope this helps.