Run Mail Script in Email Template?

Cheri M
Kilo Sage

I have to be doing something wrong that someone will see here.

Here is my scenario: A user receives a notification from ServiceNow and has the option to click on a mailto link to send back and kick off an inbound action, similar to the approval emails. I want a the new email to popup with prefilled Subject/Body but I also need to include an email in the CC. I wrote a mail script to add the CC email address.   I am calling it in the email template but it just prints the variable and doesn't run.   I put in another variable and it seems to work fine.   I checked the source code and there isn't any funky HTML happening around it. Can we not call mail scripts in the email templates?   If not, what are my options?   Much appreciated!

2016-06-17 10_34_41-Re_ RTSK0010020 - Started  - Message (HTML).png

19 REPLIES 19

so i think what broke it was a mailto script in the email notification.



${mailto:mailto.incident.assign?cc=test@test.com}



because in normal scripting the ?cc= email address


is what adds the CC email.


Well dont try that!!!!!


You guys are funny.   I tried all those things (and btw it did not blow up my instance).



Here's a better/easier/I-will-be-done-with-this-now IDEA



I just send out a separate email to the CC groups after the email is received in SNow.   A coworker suggested it.   Great suggestion and I'm done.



Thanks all!


Go for it Cheri! (and let us know how that works.)



I like simple when simple works!


sounds good to me.


Hi Cheri,



In last week, I was asked to change the "replyTo" address which gets auto populated when you click on "Click here to approve this record " link which gets generated on email via 'mailto' tag.



I tried to call the notification script from 'mailto.' template what we had and it did not run, similar to your issue.



This is what I ended up configuring later on



find_real_file.png



I have generated an mailto email template from notification script and set reply to address from there since I did not find any alternate way.