About Mail Branding

Add a wrapper around bodyHTML.

Category 1Markup Generation
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Category 2Other Modules
Modules that have a unique purpose not covered by existing categories.
Release StateBeta
Close to stable, but users are advised to be cautious and test thoroughly.*
Module Version0.1.3
Class NameWireMailBranding
Compatibility2.6, 2.7
Date AddedOctober 28, 2015
Last UpdatedNovember 13, 2015
Recommended ByNew recommendations may take up to 1 day to appear.


This module's files should be placed in /site/modules/WireMailBranding/
How to install or uninstall modules



Add email templates to wireMail

How it works?

Create an email template without content. On the spot where you wish to have your content place the tag {bodyHTML}. The markup you've set with $mail->bodyHTML('<p>Markup</p>'); will replace that tag.

Setting the defaults

Go to the module settings and set the path to your email template. Make sure it is an absolute URL. Optionally you could inline all CSS with Emogrifier when you add a CSS file. The CSS file needs to be placed in the same folder, have the same basename as the wrapper and should end with the .css extension.

When using the Emogrifier CSS inliner applying it on the bodyHTML only is the most efficient way. We recommend you to write the inline styles for the wrapper manually.

Overwriting the defaults

The API overwrites the settings set in the module configuration.

$mail = wireMail();
$mail->subject('Mail Subject');

// Overwrite the Absolute URL

// Overwrite the Emogrifier CSS inliner. (0, bodyHTML, wrapper)

$mail->bodyHTML('<p>This paragraph will replace the {bodyHTML} tag in the mail template.</p>');

The added methods

// Disable the wrapper template* (Just send the bodyHTML)

// Disable the Emogrifier inliner

// Apply only on bodyHTML. (optimal when using Emogrifier inliner)

// Apply over the complete HTML.


This module is written by Martijn Geerts and sponsored by Calago.nl.