How to forward email from the backend of instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 09:56 AM
I created an email parser and would like to forward emails so security incident can be created. I can send email by going to outbox and reprocess email in other to send but not sure how to forward the email
Can someone guide me on how to forward email on the SNOW instance? is this even possible
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 10:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 10:19 AM
This does not explain how to actually forward an email from the instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 11:15 AM
HI @Lydon ,
I trust you are doing great.
Create an Inbound Email Action: First, you need to configure an Inbound Email Action to parse incoming emails. This action should extract the required information from the email and trigger the creation of a security incident. You can define this action by navigating to "System Policy" > "Inbound Email Actions" in your SNOW instance's interface.
Create an Email Script: In order to forward the email, you'll need to create a script that uses the "email.send()" function provided by ServiceNow. This function allows you to send emails programmatically. Here's an example script that demonstrates how to forward an email using this function:
// Example Email Forwarding Script
var email = new GlideEmailOutbound();
email.setSubject('Forwarded Email: ' + current.email_subject);
email.setBody('Original message:\n\n' + current.email_body.text);
email.addRecipient('recipient@example.com');
email.send();
Regards,
Riya Verma