htmlmail.tpl.php in HTML Mail 5
Same filename and directory in other branches
Default template for HTML Mail
HMTL Mail will first look in the directory of the current used theme for a file named "htmlmail.tpl.php". If it exists, it will be used as template for e-mails. If the file doesn't exists, this file will be used instead.
DO NOT EDIT THIS FILE. If you want to customize the template, copy this file to the directory of the used theme, and edit the copy.
The following variables are available in this template:
- $body : message body
- $header : template header
- $footer : template footer
- $css : template css
- $path : path to theme template (for images, etc)
For tips and resources on building HTML e-mails see: http://www.campaignmonitor.com/css/ http://www.mailchimp.com/articles/email_marketing_guide/ http://css-tricks.com/using-css-in-html-emails-the-real-story/
1 theme call to htmlmail.tpl.php
- htmlmail_mail_alter in ./
htmlmail.module - Implementation of hook_mail_alter().
File
htmlmail.tpl.phpView source
<?php
/**
* @file
* Default template for HTML Mail
*
* HMTL Mail will first look in the directory of the current used
* theme for a file named "htmlmail.tpl.php". If it exists, it will
* be used as template for e-mails. If the file doesn't exists,
* this file will be used instead.
*
* DO NOT EDIT THIS FILE. If you want to customize the template, copy this
* file to the directory of the used theme, and edit the copy.
*
* The following variables are available in this template:
*
* - $body : message body
* - $header : template header
* - $footer : template footer
* - $css : template css
* - $path : path to theme template (for images, etc)
*
* For tips and resources on building HTML e-mails see:
* http://www.campaignmonitor.com/css/
* http://www.mailchimp.com/articles/email_marketing_guide/
* http://css-tricks.com/using-css-in-html-emails-the-real-story/
*
*/
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
if ($css) {
?>
<style type="text/css">
<?php
print $css;
?>
</style>
<?php
}
?>
</head>
<body class="htmlmail">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php
if ($header) {
?>
<tr>
<td valign="top" class="htmlmail-header">
<?php
print $header;
?>
</td>
</tr>
<?php
}
?>
<tr>
<td valign="top" class="htmlmail-body">
<?php
print $body;
?>
</td>
</tr>
<?php
if ($footer) {
?>
<tr>
<td valign="top" class="htmlmail-footer">
<?php
print $footer;
?>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
</body>
</html>