Notification Email Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2018 03:34 AM
Hello!
I am creating an email notification script that uses different font size and color. This is my script:
(function runMailScript(current, template, email, email_action, event) {
template.print('<p><font size="16" color="#808080" face="arial"><strong>');
template.print(gs.getMessage('ITSM'));
template.print('</strong></font></p>');
template.print('<p><font size="12" color="#000000" face="arial"><strong>');
template.print(gs.getMessage('${number} - ${short_description}'));
template.print('</strong></font></p>');
})(current, template, email, email_action, event);
However, when I add this to an email notification the email generated displays the text 'ITSM' and 'INC-SHORT DESC' with the correct color and face BUT the size is not "16" and "12", respectively.
Please help!
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2018 03:41 AM
Not sure if this the reason, this is what i found in w3 site
The size attribute of <font> is not supported in HTML5. Use CSS instead.
CSS syntax: <p style="font-size:20px">
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2018 07:44 PM
Hi,
I have done some changes in your script for using Inline CSS in HTML Template.
(function runMailScript(current, template, email, email_action, event) {
template.print('<p style="font-size:16px; color:#808080; font-family:arial"><strong>');
template.print(gs.getMessage('ITSM'));
template.print('</strong></p>');
template.print('<p style="font-size:12px; color:#000000; font-family:arial"><strong>');
template.print(gs.getMessage('${number} - ${short_description}'));
template.print('</strong></p>');
})(current, template, email, email_action, event);
Let me know if you are facing any issues.
Mark Correct if it helps.
Regards,
Chandra Prakash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2018 11:47 PM
Hey Chandra. It does not recognize the color, font and size. When checking the generated email in Outlook, the color is black and font is Times New Roman instead of Arial.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2018 12:28 AM
Refer this Blog, to get some more information to apply CSS in Email Scripts.
Mark Correct if it helps.
Regards,
Chandra Prakash