How to identify the 'from' address of an email received in the instance

Riyas1
Tera Contributor

I have a requirement where I need to create tasks if email is received from a particular email address(Routed from a DL to ServiceNow). I can achieve that using the email.from method in Inbound actions. My doubt is how to check the 'from' address of the emails in the Email log? I have checked the headers field and couldn't find it. My another doubt is when emails are forwarded from DL to ServiceNow instance, will the 'from' address of the email be that of the DL?

4 REPLIES 4

Mohith Devatte
Tera Sage
Tera Sage

hello @Riyas1 

you can try this kinda line  in your inbound email action to find the from address and write your task insertion logic after validation 

 

if(email.from.toLowerCase()) =="your_from_Address_DL")

{

//write your logic to insert the task

}

Hope this helps 

mark my answer correct if this helps you 

Thanks

 

 

I know how to access it in the inbound script. What I need to know is how to check the from address in the email logs.

hello @Riyas1 i can see it in headersScreenshot 2022-11-17 at 16.23.51.png

Were you able to access the from address?

I am trying to manually create an email to trigger my inbound flow. the inbound flow automatically identifies the "from address". But not able to do it in email that I created manually. I have updated all the details following another actual email. Updated the from address in the header field as well. But still its failing.