
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 06:33 AM
Hi All,
We have a requirement to receive the same email to couple of instances. For example if user send an email to dev1@service-now.com then it should be received in dev2@service-now.com. Ideally this is not possible, but I am looking for the way once email received in dev1 it should forward to dev2 as well just like user has forwarded to dev2.
I have tried to create SOAP message in dev1 and used direct web services of sys_email table and tried to insert the record in dev2 using BR, but it is unsuccessful. Could you please provide your thoughts how this can be achieved if any.
Also, please help me to understand the incoming email processing logic in service now. I knew that inbound action process the every incoming email and move to Received after it is processed. But I want to understand which BR on snow runs and sets the sys_email columns like UID, target_table, target, headers etc.,
Thanks in advance!
Regards,
Sunil Safare
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 12:06 AM
Hi
The easiest way is to create a business rule, which makes a copy of all received emails, and then creates a new mail in the outbox sending it to the other instance.
To create an email directly in the outbox do this:
var mail = new GlideRecord("sys_email");
mail.initialize();
mail.mailbox.setDisplayValue("Outbox");
mail.recipients = ("otherinstance@service-now.com");
mail.subject = ("Fw: " + current.subject);
mail.body = (current.body);
mail.type = "send-ready";
mail.content_type = "multipart/mixed";
mail.insert();
Regarding the processing of an email (target, header ect) this is not done via business rules, so you can't access that part of the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 02:34 AM
Hello Sunil,
Can you check/verify that the email is indeed in the 'sent' mailbox on dev1?
Also is mail receiving enabled and is (other) email being received and processed on dev2?
Gerrit Kuilder

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2017 02:50 AM
Yes Gerrit. Its working fine now.
Thanks all for your help.
Regards,
Sunil Safare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2020 10:08 PM
Hi Sunil,
could you please mention all the steps which you did to achieve this requirement. like BR, Setting change, and mail changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 02:58 AM
Strange to have such requirement. since when you are using this on a pre-prod environment, I would hope that the email is being routed towards 1 specific mailbox. therefor the email would never be received by the other instance.