Mail script font wrong in notification

Bidduam
Tera Guru

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.

 

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.

1 ACCEPTED SOLUTION

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!

View solution in original post

5 REPLIES 5

Bidduam
Tera Guru

Anyone got ideas?