Loading

Email Template Signature Displays HTML Code Instead of Formatted Text When Using Merge Fields in Salesforce

Дата публикации: May 4, 2026
Описание

This article explains why a user's email signature in Salesforce displays raw HTML code as plain text instead of rendering the formatted signature when the signature is included in an email template via a merge field.

Symptom

When a Salesforce user creates a signature using HTML formatting (such as bold text, colors, or clickable links) and that signature is referenced in an email template using the {{{sender.signature}}} merge field, the email template renders the HTML tags as visible text rather than formatted content.
For example, a signature containing <b>John Smith</b> in the user's signature settings would appear in the sent email as the literal text <b>John Smith</b> instead of displaying as John Smith in bold.

Why This Happens

The {{{sender.signature}}} merge field in Salesforce Email Templates does not support HTML rendering. The signature merge field is designed to work with plain text only. When HTML code is stored in the signature field and then called by the merge field, Salesforce outputs the raw HTML as a text string rather than rendering it as formatted content.

Решение

This behavior is expected in Salesforce. The {{{sender.signature}}} merge field does not support HTML and only works with plain text signatures.

Option 1 — Use a Plain Text Signature

To ensure the signature displays correctly when used in email templates via merge fields, update the user's signature in Salesforce to use plain text only (no HTML tags, no formatting code).
To update a user's signature:

  1. Click the user's profile icon and select Settings (or My Settings in Salesforce Classic).
  2. In the Quick Find box, enter Email and click My Email Settings.
  3. Update the Email Signature field to plain text only.
  4. Click Save.

Option 2 — Use a Custom Rich Text Field as a Signature Workaround

If users require an HTML-formatted signature in email templates, a Salesforce administrator can create a custom rich text field on the User object to store the HTML signature. Users then design their formatted signature in that field, and the email template references this custom field via its merge field syntax instead of {{{sender.signature}}}.
Steps for the administrator:

  1. Go to Setup | Object Manager | User | Fields & Relationships.
  2. Click New and select Rich Text Area as the field type.
  3. Name the field (for example, HTML Signature) and configure the field-level security.
  4. Click Save.
  5. Have users populate this custom field with their desired formatted signature.
  6. In the email template, reference this field using its merge field syntax (for example, {{{User.HTML_Signature__c}}}).
Note: This workaround requires the administrator to configure the field and update templates to use the new merge field.
Дополнительные ресурсы

Vote and comment on the Salesforce Community Idea - Signature Merge Field Support for HTML {{{sender.signature}}}

Trailblazer Community - Signature in HTML format

Add a signature to email templates

Video - Rich text Signature emailing from Salesforce

Номер статьи базы знаний

000389003

 
Загрузка
Salesforce Help | Article