
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 05:16 PM - edited 02-18-2024 02:45 PM
I have a mail script that is working as I'd like it to, other than the font and font size.
I've tried a number of things already, none of which have worked.
- Didn't work:
Solved: How do I change the font family and font size that... - ServiceNow Community - How to change the default font-family and font-size for email notifications - Support and Troublesho...
This one involved creating a mail template and I tried it, also didn't make a difference. - How to Change Font Style of email scripts - ServiceNow Community
I've also tried adding the following:
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
if (current.variables.question1 == 'yes') {
template.print('<p style="font-size:11px; font-family: Calibri, sans-serif;"><li> The font is not working as expected.<br>');
}
})(current, template, email, email_action, event);
Also not worked:
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
template.print('<p style="font-size:11px; font-family: arial;">');
if (current.variables.question1 == 'yes') {
template.print('<li> The font is not working as expected.<br>');
}
template.print('</p>');
})(current, template, email, email_action, event);
Assistance would be very much appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 08:20 PM
Hi,
Thanks for providing more info! That helps!
With what you've said, the part I provided would be added to your mail script, like example:
var body = '<span style="font-family: arial, helvetica, sans-serif; font-size: 11pt;">Testing 1 2 3!</span>';
template.print(body);
So that span style I've provided is for arial font size 11 with same example text.
If you were to create a test mail script with only what I've provided above and then add that to your notification instead of your current mail script, does everything all match font type and size?
If so, you can then continue to use that for your mail script and adjust your text, etc.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 08:15 PM
Anyone got ideas?