- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 10:52 PM
Hi,
I have to allow more than one email address those can send emails to ServiceNow instance.
I'm working on inbound action and I want to allow multiple domains hat can send emails to my ServiceNow instance and I want to create multiple email account for my ServiceNow instance.
Can anyone please tell me how we can achieve.
Regards,
Nivedita
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2022 06:34 AM
Hi All,
We can achieve it by using email address filter.
1. Create Email Address filter and add that domain name in domains field that you want to allow
and add domain name in exceptions which you don't want to allow.
2. Create System Address filter and add this Email Address filter in that.
3. Open POP3 Email Account and add System Address filter in that.
Please see screenshot to achieve it :
Hope this helps to everyone.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 02:08 AM
I'm calling sys property here.
When I'm removing any email address from sys property value then also I'm able to receive emails from that email address.
It should not receive email from that email address.
Can you please correct me.
Regards,
Nivedita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 02:15 AM
Change line 4 to
var donotaccept=gs.getProperty('allow_domains')
if(email.origemail.indexOf(donotaccept)>-1){
//allow code here
}
else
{
//do not allow code
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 02:28 AM
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
var donotaccept=gs.getProperty('allow_domains');
if(email.origemail.indexOf(donotaccept)>-1){
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
current.rich_description = email.body_text;
current.opened_by = gs.getUserName();
current.subject_person = gs.getUserName();
current.opened_for = gs.getUserName();
current.hr_service = '6628cde49f331200d9011977677fcf0b';
current.notify = 2;
current.contact_type = "email";
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.importance != undefined) {
if (email.importance.toLowerCase() == "high") {
current.impact = 1;
current.urgency = 1;
}
}
current.insert();
}
else
{
gs.info('not allowed');
}
})(current, event, email, logger, classifier);
I'm using this still I'm able to get emails from this email address.
Can you please correct it.
Regards,
Nivedita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 02:30 AM
Because the if clause is satisfied. You need the logic in else part instead of if part of script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 04:13 AM
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
var donotaccept=gs.getProperty('allow_domains');
if(email.origemail.indexOf(donotaccept)>-1){
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
current.rich_description = email.body_text;
current.opened_by = gs.getUserName();
current.subject_person = gs.getUserName();
current.opened_for = gs.getUserName();
current.hr_service = '6628cde49f331200d9011977677fcf0b';
current.notify = 2;
current.contact_type = "email";
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.importance != undefined) {
if (email.importance.toLowerCase() == "high") {
current.impact = 1;
current.urgency = 1;
}
}
current.insert();
}
else
{
gs.info('not allowed');
}
})(current, event, email, logger, classifier);
I have put this in else part and according to me it is correct.
Please correct my code to achieve it.
Regards,
Nivedita