Change font and font size in email script include

Thrishna Strach
Kilo Expert

Hi all,

We are using email client templates all with the format Font=Source Sans Pro, Font size = 12. However, when we use the reply/ reply all/ forward buttons in an Email received/ sent in the instance, the text generated by the called email script include - insert_original_email_message - is set to Font=Verdana, Font size = 8.

So if I click anywhere except on the text below, font is SSP size 12. The text itself is font V size 8.

find_real_file.png

I've googled, and tried a few variations with template.print and then the desired font and size, but none of my attempts have worked.

This is the OOB script below. Does anyone know how I need to change this so that the text generated by the email script include is also font SSP size 12? Any help would be much appreciated.

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// This mail script is intended to be used by the response client templates and will only work as expected
// if called from a template with a content type of HTML. current represents the original sys_email record.
var uname = current.user;

if (current.type != 'received') {
var u = new GlideRecord('sys_user');
uname = current.sys_created_by;
if (u.get('user_name', uname))
uname = u.name.toString() + '<' + u.email.toString() + '>';
}

var cdate = new Date();
cdate.setTime(current.sys_created_on.getGlideObject().getNumericValue());

var usePlainTextResponseContent = gs.getProperty('glide.email_client.use_plain_text_response', 'false');

if ((usePlainTextResponseContent == 'true' && !current.body_text.isNil()) || current.body.isNil()) {
template.print("On " + cdate.toLocaleString() + ", '" + uname + "' wrote:\n\n");
// Process plain text to dislay in HTML email client
template.print(sn_notification.EmailResponse.getOriginalEmailTextContent(current.getUniqueValue()));
} else {
template.print("<div>On " + cdate.toLocaleString() + ", '" + uname + "' wrote:<br />");
template.print("<blockquote>");
// Remove html, head, body and style tags
template.print(sn_notification.EmailResponse.getOriginalEmailHtml(current.getUniqueValue()));
template.print("</blockquote></div>");
}
})(current, template, email, email_action, event);

 

The information in the email client template is:
font-family: 'Source Sans Pro', verdana, sans-serif; font-size: 12pt;

 

Kind regards,

Thrishna

6 REPLIES 6

Hi @Thrishna Strachan-Visser 

Did my reply answer your question?

If so, please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

If not, please tell me what is still missing.

Kind regards
Maik

Hi Maik,

Thank you for the suggestion. I'm putting this on my list to review this week. Will let you know.

Kind regards,

Thrishna