Formatted Email

lightning-formatted-email

Displays an email as a hyperlink with the mailto: URL scheme.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App, Mobile Offline

A lightning-formatted-email component displays a read-only representation of an email address as a hyperlink using the mailto: URL scheme. Clicking on the email address opens the default mail application for the desktop or mobile device.

This example displays an email address with an email icon. The email address is displayed as the default label.

This example prevents the display of the email icon.

Multiple email addresses are supported. The label "Send a group email" is displayed as a hyperlink in this example.

This example creates an email address with values for cc, subject, and email body. The label is displayed as a hyperlink.

The LWC Recipes GitHub repository contains code examples for Lightning Web Components that you can test in an org.

For a recipe that uses lightning-formatted-email, see the following components in the LWC Recipes repo.

  • c-nav-to-record
  • c-wire-get-record-user