how to test email.to condition in dev instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 10:10 PM
i am trying to test an forward type inbound action having condition in the script:
createRequest();
function createRequest() {
if(email.to.toString().toLowerCase().indexOf("ssc-atp@test.com") > -1){
But i am not sure how to test this as i am forwarding mail to this user and not to instance.
i am not getting anything in the email logs as well.
Any guide how to test this scenario...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 11:19 PM
Hello Avani,
Usually, when I want to test if my DEV instance sends any emails /email notifications/ to a contact ID (email address), I always look into the email logs.
Yet, before doing so I ensure that the Email Sending option is enabled (System Properties > Email Properties). Is it enabled in your platform?
If it is and yet no emails are being send to the email address you specified, then why don't you add an info line in your code to see if it will be displayed in the System Logs?
Best Regards,
Georgi Mavrodiev
IT Consultant
Do IT Wise
You may visit us in our Web Site: www.doitwise.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 11:46 PM
from where we can send mail from dev instance ??
all the properties are enabled...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 11:32 PM
Hi Avani,
By using inbound email we can forward email:
keep a condition like this : email.body.indexOf('Ref:MSG') > -1 )
system policy-->email--> inbound actions
Script:
current.caller_id = gs.getUserID();
current.comments = "forwarded by: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
current.category = "request";
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.body.priority != undefined)
current.priority = email.body.priority;
current.insert();
please follow this link:
http://wiki.servicenow.com/index.php?title=Inbound_Email_Actions#gsc.tab=0
PS: Your feedback (Like, Helpful or Correct) helps community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 11:58 PM
Hi Avani,
we can send mails through Notifications from developer instance..
system notifications-->email--> notifications
please go through these links:
http://wiki.servicenow.com/index.php?title=Configuring_Email#gsc.tab=0
http://wiki.servicenow.com/index.php?title=Email_Notifications#gsc.tab=0
please hit like/comment or helpful if applicable