- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
An inbound email action script has access to various pieces of an inbound email through script variables. The script variables email.from and email.origemail can be different.
email.from
email.from contains an email address according to the following conditions. If the address listed in the email Headers field matches an existing user's Email address, this variable contains the user's Email address. If the address listed in the email Headers field does not match an existing user's Email address, this variable contains the address listed in the email Headers field (starting with Eureka Patch 5) or the Guest user's Email address (in versions prior to Eureka Patch 5).
email.origemail
Now, email.origemail contains the email sender's address as listed in the email Headers.
Here is an example to show the difference between email.from and email.origemail
I've created an inbound email action 'Create Incident - JS', Type=New
The script is:
gs.log("-email.origemail: " + email.origemail + " -email.from: " + email.from + " - - JS");
current.caller_id = gs.getUserID();
current.comments = "-email.origemail: " + email.origemail + " -email.from: " + email.from + "\n\n" + email.body_text;
current.short_description = email.subject;
current.insert();
Then I've created a user with
-userid=test.user@abc.com, email=test3.user@abc.com
NOTE the (number "3" on the email).
Then with the user test.user@abc.com, you sent the email to the instance. Once the email is recieved, you will notice the headers contain > From:Test.User@abc.com.
Now, on the logs and incident comment created, you will see:
-email.origemail: Test.User@abc.com-email.from: test3.user@abc.com
More information here:
- Email Resources Page (KB0540674)
- Group Email is not included as a notification recipient if email address is the same as a user email...https://hi.service-now.com/kb_view.do?sysparm_article=KB0622728
- Updating email address on HR Profile table does not update primary email in Notification Device tabl...
- Email address in CC field also appears in To when an inbound email is updated in target record activ...
- Diagnosing and remedying stuck event processes
- Docs: Create an email notification
- Docs: Notifications
- Verifying the recipient has an email address (KB0528669)
- Verifying the recipient's email address is properly formatted (KB0528671)
- Speed up your email delivery by validating recipients
- My other blogs
- 12,839 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.