Can Email User Label Be Changed For Outgoing Notifications

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2015 05:53 AM
Hi,
I was just doing an POC on Email Accounts and was able to configure multiple POP's.
I have two Questions around the same :-
1. Do we have a way to check in Inbound Scripts the mail is Popped in Servicenow using which Account and process the mails accordingly. Definitely we can impose a condition email.direct.indexOf('xyz@abc.com') >-1 but the challenge is if user is sending out mails to two account both configured in Email Account it will lead to discrepancies. Was looking a secure way to process mails
2. If a user is sending mail to 'abc@xyz.com' we expects a reply from the same, which can be configured using from attribute in notification but the Email Label remains "IT Service desk" which is confusing as sometimes users are receiving mails IT Service Desk <abc@xyz.com> and sometimes IT Service Desk <xyz@abc.com>
Has anyone worked on similar kind of requirements. Suggestions are welcomed
Regards,
Ayush Saxena

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2018 06:23 PM
Not sure if you got the answer but I had similar requirement and figured out a way. Thought would share with you!
You can do it 2 ways
1) In the notification, you can use the below format in the from field
TEST NAME <ab@gmail.com>
2) If you want to use mail script, use the format below.
email.setFrom("TEST NAME <ab@gmail.com>");
Note: if you are using mail script, the From should be blank in notification otherwise it will not work as From field in notification take precedence over the email script value.