HTML email templates in Salesforce may display extra spaces or unwanted line breaks after being saved. This issue typically occurs when template content is created or pasted from Microsoft Word, or when the template encoding is not set to Unicode (UTF-8). This article explains the most common causes and how to fix each one.
When template content is created in Microsoft Word, Word's auto-formatting feature adds formatting information (such as hidden line breaks and paragraph styles) that Salesforce does not support. This causes extra spaces to appear in the rendered email.
Fix: Turn off the auto-format function in Microsoft Word before copying content into the Salesforce email template editor. Alternatively, undo auto-formatting as it occurs in Word.
When text is copied from external sources such as a website or document, line breaks from the original content may create extra spaces in the Salesforce template.
Fix:
Alternatively, in the Salesforce template editor, backspace over the extra line spaces and press Shift+Enter to remove unwanted line breaks.
Incorrect encoding settings can cause extra spaces to appear, especially when using languages other than English or when the template uses special characters.
Fix:
Note: The Language & Time Zone setting in personal settings affects how emails are encoded. Changing to UTF-8 resolves encoding-related spacing issues in most cases.
additional_resources__c (Updated):
See Also
Email template not displayed in Outlook or other email clients
000385058

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.