Skip to content

Importing into your ESP

Every email platform that accepts custom HTML works with Modular Mail. The steps differ a little between platforms, but the idea is always the same: create an email using the platform’s HTML or code editor rather than its drag-and-drop builder, and paste in your export.

  1. Export the campaign and copy the HTML.
  2. In your ESP, create a new email, campaign or template. Choose the option for your own HTML. It’s often called Code your own, Custom HTML, HTML editor or Paste code.
  3. Paste the HTML and save.
  4. Set the subject line and preview text in the ESP, if it asks. Many ESPs use their own fields rather than the <title> and preheader in the HTML.
  5. Preview, send a test from the ESP and send as normal.

If you can’t find the option, search your ESP’s help centre for “custom HTML” or “import HTML”. Menus change often, so check your ESP’s own documentation if the notes below don’t match what you see.

Create a template using Klaviyo’s HTML editor and paste the export, then use the template in a campaign or flow. Klaviyo’s subject and preview text are set on the campaign or flow email.

Klaviyo uses its own template tags, such as {{ first_name|default:'there' }}, and needs an unsubscribe link in every email. Use {% unsubscribe_url %} as a link’s URL in your footer.

Many ESPs let you save HTML as a reusable template, or paste it into a single campaign. With Modular Mail, each export is a finished email, so pasting it into the campaign is usually simplest. If your ESP needs a template for every campaign, save each export as its own template, named after the campaign.

For automated flows, such as welcome or abandoned basket emails, build each email as a campaign in Modular Mail and paste its export into the flow’s email.

Why an email might look different in your ESP

Section titled “Why an email might look different in your ESP”

The ESP changed your HTML. Some editors tidy or rewrite pasted code. Use the plain HTML or code editor rather than a visual one, and turn off options to “clean up” or “optimise” HTML if your ESP has them.

CSS was inlined twice. Some ESPs inline CSS automatically. Your template’s styles are usually inline already, so turning off automatic inlining avoids conflicts.

Links were rewritten. ESPs wrap links for click tracking. That’s normal. Send a test and click each link to check where it goes.

Images don’t load. Image URLs must be absolute and public. Images from the Modular Mail media library are. If you use your own hosting, check the image addresses haven’t been changed.

The preheader shows twice or not at all. Some ESPs add their own preheader from a preview text field. Use either the ESP’s field or Modular Mail’s, not both: leave one empty.