Fetch on behalf of email id from outlook

When an email is sent from group email box some mails are popping up in below format
Srikanthg@abc.com on behalf of internationalgroup@abc.com(Group email ID)
If I use mailobject.sender or mailobject.from I am getting Srikanth@abc
How can i fetch on behalf of email address here.

Hello @Arun1 - AFAIK you can’t natively perform this action from SMTP, Outlook or any other Get mail options.

The only workaround I can help you with is the following:

  • Get the Original sender’s name or email.
  • Check if it’s a part of the sender’s name containing “on behalf of” substring.
  • If there is this data, you can replace all the other data with double quotes (null) and you only get the Behalf portion.

Let me know if this works for you!

Welcome to the community!
Take a look inside of the MailMessage.Headers property to see what you find.