Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Use mail script in plain text only mail template

Felix20
Mega Guru

Hi everybody,

is there a possibility to use a mail script in a plain text only mail template?

We need to send an email without html content but only text, but this mail is not static so I need to use a mail script to get different content for every mail. That mail is triggered by an event from a workflow and the content is in the parm2 variable of the event.

 

Best regards,

1 ACCEPTED SOLUTION

i tested it my personal instance. 

 

Screenshot for reference. 

 

find_real_file.png

 

find_real_file.png

 

result.

 

find_real_file.png

 

 

View solution in original post

9 REPLIES 9

Omkar Joshi
Giga Guru

Hi,

Get content in one variable and add this below script.

var text='</div>'+ add your variable here+'</div>';

template.print(text);

Harsh Vardhan
Giga Patron

yes you can. 

 

example:

 

find_real_file.png

 

 

No,

I tried it and mail will containt ${mail_script:XXX}

while you preview the notification are you also getting the ${mail_script:XXX} ?