Send an Email campaign

Before getting started, be sure you've properly setup email. After that's done, go to the Messaging dashboard and click Create Message to start a new message. Select Email.

Create your first email 

Choose a template

In the Message Composer, when you select the “Email” message option, the template picker will be visible on the left side. You can choose one of three default templates for email, or a blank template to start from scratch.

Configure message settings 

  • Sender name: The name users will see as the sender. Defaults to your "From" name in App Settings (see above).
  • Sender email: The email address users will see as the sender. Defaults to your "From" address in App Settings (see above).
  • Recipient name: The name of the user receiving the email. Defaults to blank.
  • Recipient email: The email address for the user receiving the email. Defaults to your Email user attribute in App Settings (see above).
  • Subject: The subject line for the email campaign.

Note: Be sure to click Show More to review all the settings before sending. Your settings should look something like this.


The email Message Composer features a full rich text editor. You can insert images, styled text, and Leanplum values.

Format text

Styled text

You can use normal keyboard shortcuts (ctrl+B or command+B on mac for Bold), or use the buttons on the toolbar or in the format menu to format selected text. Options include:

  • bold
  • italic
  • underline
  • strikethrough
  • superscript
  • subscript


To quickly change the size and weight of text, you can select from several HTML heading tags for your text. Go to Format > Formats > Headings to change the heading format.

Insert photos or video

Insert or Edit inserted videos

  1. Click Insert > Insert/Edit Video
  2. Under General, enter the URL of video into Source
  3. Click Ok

Embed a video

  1. Click Insert > Insert/Edit Video
  2. Under Embed, enter the embed code
  3. Click Ok

Insert or Edit inserted an image

  1. Click Insert > Insert/Edit Image
  2. Under URL, enter the hosted URL of the image, or click the Folder icon to select a file from your Leanplum files or personal computer.
  3. Click Ok

Insert links


To insert a weblink, click Insert > Insert/Edit Link. Enter the URL with https:// then enter the Text to Display. You can also change the Target setting to "new window" so the link will open in a new browser tab or window instead of leaving the email.


Unsubscribe link

Leanplum lets you quickly add an Unsubscribe Link to your email.  Click Insert > Unsubscribe Link. This will add a normal Link with the URL and Text to Display settings pre-populated. 


In the Message Composer, you can insert dynamic Leanplum values, like user attributes, event values, and other data tracked in Leanplum. This data is specific to each user, and will be inserted dynamically by Leanplum when we send the message.

You can use the Insert Value tool in the Message Composer, or manually type in variables using the Jinja templating language, which uses the handlebars-standard double curly braces {{ to indicate and enclose a dynamic element.

Hello {{ "first_name" value }}, how are you?

To insert a value:

  1. Click Insert Value on the toolbar or Insert > Insert Values
  2. Select the value from the dropdown.

Once added, it should look something like this:

Edit the source code

If you ever need to touch-up your email's formatting, you can quickly view and edit the HTML source code by clicking the <> icon in the toolbar. Make your changes and click Ok to save.

Add a preheader as Hidden Preheader Text

A preheader is a short summary that follows the subject line when an email is viewed from the user’s inbox. The summary gives the recipient insight into the email’s content before they open it.


To add preheader text to your email template, modify the following preheader code then add it in the source code within the body tag for each mailing.

<div style="display: none; font-size: 1px; color: #fefefe; line-height: 1px; font-family: 'Lato', Helvetica, Arial, sans-serif; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden;">
We're thrilled to have you here! Get ready to dive into your new account.



At any time, you can preview your message by sending it to yourself, or someone you know. Click the preview button, then enter the email address you’d like to send the preview to. It defaults to your email address.

Note: Any personalized values in a preview will be populated from the user profile associated with your test device. If you don't have a registered developer device, Leanplum will pick an arbitrary user profile from your userbase (usually the first user). Any data (including unsubscription links) will be populated for this user. 


You can target an email campaign using Leanplum segments, just like other messages. To learn more about how to target by segments, click here.


You have several options for scheduling delivery of Leanplum emails:

  • Immediate: The email will be delivered when you click “Send Now.”
  • Scheduled: The email will be delivered at a specific time in GMT, UTC, or the user’s time zone, or at the Optimal Time, a time determined by Leanplum’s algorithm for each user.
  • Triggered: The email will be delivered whenever a user meets the trigger criteria you set.
  • Manual: The email will be sent when you call our API with the sendMessage action.



Was this article helpful?
Have more questions? Submit a request