Skip to main content
Question

How can I distinguish the original sender's email in forwarded Microsoft Office 365 emails with three addresses?

  • July 2, 2024
  • 1 reply
  • 32 views

Hello,

I’m parsing email data from the step: New Email in Microsoft Office 365

I want to know the difference between these 3 email addresses.

I also want to know if email is forwarded, would it be possible to get the original sender email from any of these 3 fields?

 

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7597 replies
  • July 4, 2024

Hi there @clicksincontext, welcome to the Community! 🎉

Great question! I couldn’t see any documentation for Microsoft Office 365 on this end but I wonder if it’s similar to how Mailgun works in that the sender is the email domain is what the receiving email server sees when initiating the session and the from address is what the recipients of the email see. 🤔 The To Recipients fields would just contain the details for the recipients of the email that triggers the Zap. 

I’m not seeing any specific field that would indicate whether an email is forwarded, but perhaps it can be identified from the subject of the email? For example when forwarding an email it would normally add “Fwd:” to the start of email’s subject so you could use a filter to check whether the email’s subject field (Text) Starts with the word Fwd:. Then you could use a Formatter (Text > Extract Pattern) action to extract the From email address that’s included in the body of the email - usually added in the format of:

From: Original sender name <theiremailaddress@goeshere.com> 
Sent: Date the email was sent
To: Recipient name <recipientsemailaddress@goeshere.com> 
Subject: Original email subject goes here
And then has the email text that’s being forwarded. 

If you’ve not worked with Extract Pattern actions before I’d recommend checking out these guides to learn more: 


Do you think that approach might work for your needs here?

Regex patterns can be a bit tricky so let me know if you give that a try and run into any issues! 🙂