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

That makes sense that at that point I am in Outlook.   Any ideas on how I can make it put an address in the CC when you open?   I know the html for that but not sure how to put it inside my template to run when clicked. I am spending entirely too much time on this one item!


no i'm not sure.  
i was looking into this a few months back and gave up, because i'm not sure you can auto add a CC.



but re-evaluating this today,   i may have an idea.   i'll get back to you.


lol     i broke my instance looking for an answer for this.


see this thread



help with My Dev instance not working


aww man, I'm sorry! I won't do whatever you just did.   Thanks for the cautionary tale!


THEORETICALLY (spelled in caps on purpose)...



You can use cc= in your mailto: URL to include Cc addresses. I've only done Subject= before and it works. I haven't tried cc.



Example: mailto:instance@service-now.com?Subject=Approval -- approved&cc=someone@mycompany.com



Reference: https://yoast.com/dev-blog/guide-mailto-links/