Email body font size looks small in preview of email logs and looks slight bigger in outlook email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
I have configured a notification where it has email body content configured in 'Message HTML' field on notification form. Body also has Table configured from email script.
Now the issue is this looks perfect in the Preview of the email and from the email logs table's preview as well.
But in th email of outlook the font of body is bigger and font within the table is smaller compare to what we see in the preview of an email notification.
Any suggestion or root cause if anybody aware of this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
Hi there @Kartik Choudha1
You are right i have struggled with the same in the past unfortunately – the “Preview” in ServiceNow uses a browser engine, while Outlook uses its own HTML engine. so it applies different default font sizes and line heights, especially inside tables. To get them to match, try force the font styling explicitly instead of relying on defaults. Set a consistent font/size on the <body> and on the table itself.
give it a try
Solved: Change font size across the platform - ServiceNow Community
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday
this is a common issue as Outlook might interpret HTML and CSS in different ways
outlook may not support all the css and styles
Emails are not formatted correctly in Outlook or older email applications
Workaround
-> try to use inline css within both the body and table elements to increase
-> example like this <td style="font-family: Arial; font-size: 12px;">
-> try to use email template
Mini-Lab: Adding CSS To an Email Notification - Part 2
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday - last edited yesterday
Hi @Ankur Bawiskar @Its_Azar
Thanks for your responses.
Let me break down how it is written.
Body font text in Message HTML field is set to 'Arial' and '8pt' and it's HTML code looks like below (which doesn't include FONT SIZE)
<p><span style="font-family: arial, helvetica, sans-serif;">Dear Manager,</span></p>
<p><span style="font-family: arial, helvetica, sans-serif;">{email script name}</span><p>
Email script font sizing while preparing header of the table -
template.print('<table width="100%" style ="border:1px solid black; border-collapse:collapse;font-family:Arial;font-size:10pt;"><tr style="background-color: #f1f1f1;"><th style="border:1px solid black; text-align:centre;">number</th></tr>');
then one template.print to get the content from Servicenow table and print under this column headers.
This looks perfect in email logs preview.
Now the suggestion is that i should give the same(email script one) font size and family in the body text as well which i configured in Message HTML field. I want to keep all the font same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
Hi @Ankur Bawiskar @Its_Azar any suggestion on last reply of me?
For now, i have added the below line in each <span> tag of HTML source code of 'Message HTML' field.
font-family:Arial;font-size:10pt;"
<p><span style="font-family:Arial;font-size:10pt;">Dear Manager,</span></p>
<p><span style="font-family:Arial;font-size:10pt;">{email script name}</span><p>
