Search

Export and send your email

dd_emailforge builds the email. Your email service sends it. You export the HTML, paste it into your email service, send yourself a test, and send it to your list from there. dd_emailforge has no send button and doesn't connect to any email service.

Step 1: Export
  1. Press F3 and fix anything it lists (see Preview and validate).
  2. Press Shift+E. You'll see "Exporting..." and then "✓ Exported" with the path to template.html.

Export checks the template first and won't run if there are errors. dd_emailforge writes two files into your template folder, next to template.json:

  • template.html: the finished email. This is the file you send.
  • template.mjml: the in-between MJML version. You don't need it to send.
A success message in dd_emailforge confirming the export of template.mjml and template.html

Open template.html in your browser to see the finished email:

The exported ldnddev Monthly Newsletter HTML shown in a browser at desktop width
The exported ldnddev Monthly Newsletter HTML at phone width with the two columns stacked
Step 2: Copy the HTML

Open template.html in a plain-text editor (such as VS Code, TextEdit in plain-text mode, or gedit), select everything, and copy it. Or copy it straight from the terminal:

# macOS
pbcopy < template.html

# Linux (X11 / Wayland)
xclip -selection clipboard < template.html
wl-copy < template.html

Don't open it in a word processor; that can add extra formatting to the code.

Step 3: Paste it into Mailchimp

These steps follow Mailchimp's own help pages at the time of writing. Mailchimp notes that custom-coded templates use its legacy builder, and that pasting in your own HTML needs a Standard plan or higher.

  1. In Mailchimp, click Campaigns, then Email templates.
  2. Click Code your own, then Continue.
  3. Paste your HTML into the Edit code field and click Save.
  4. Open Preview and Test to check how it looks.
  5. Click Save and Exit, name the template (for example, "ldnddev Monthly Newsletter"), and click Save.
  6. Find it under the Saved tab and use it to create your email.

Prefer uploading a file? Under Code your own, choose Import HTML and upload template.html.

Merge tags work as-is

Mailchimp merge tags such as *|UNSUB|* pass through dd_emailforge untouched. The email-footer's unsubscribe link uses *|UNSUB|* by default, so Mailchimp fills in each reader's unsubscribe link when you send. You can type other Mailchimp merge tags (for example *|FNAME|* for the reader's first name) into any text field the same way.

Step 4: Send yourself a test

Always test before sending to your list. In Mailchimp, open Preview and Test and choose Send a test email. Open the test in the email apps your readers use most, such as Gmail, Outlook, and Apple Mail, on both desktop and phone.

Check that:

  • the logo and all images show (logos must be PNG or JPG, not SVG),
  • every link and button goes to the right page, and
  • the unsubscribe link works.
Using a different email service

dd_emailforge works with any email service that lets you paste or upload your own HTML. Look for an option called something like "custom HTML", "code your own", "HTML editor", or "import HTML". The steps are the same: export, copy template.html, paste it in, test, send.

What to change for a service other than Mailchimp:

  • Unsubscribe link. *|UNSUB|* only works in Mailchimp. In the email-footer, set unsubscribe_href to your service's unsubscribe tag (check your service's help pages for the exact tag), then export again.
  • Other merge tags. Use your service's own tag format. dd_emailforge passes them through as typed.
  • Images. Keep every image on a public https:// address so any service can show it.
For developers: export from the CLI
dd_emailforge export ./ldnddev-monthly                 # writes template.mjml + template.html in the folder
dd_emailforge export ./ldnddev-monthly --out dist      # writes dist/template.mjml + dist/template.html
  • --out writes exactly two files, template.mjml and template.html, and creates the folder if needed. Nothing else is copied (no images/, no JSON). It prints Wrote dist/template.mjml and Wrote dist/template.html.
  • Export validates first and exits 1 on errors, printing the same messages as validate.
  • Export runs the Node mjml compiler (mjml ^5.4.0, installed with npm install). It doesn't fall back to npx or another engine.
  • Relative image paths need an https:// base_url (top-level key, edited in [HEAD]) at export time.
  • template.json is the source of truth. There's no MJML or HTML import, so treat template.html as a build artifact.