<p>A template file is applied to your message header, subject, and body text. The default template is the included <code>htmlmail.tpl.php</code> file. You may copy this file to your default theme directory and use it to customize the contents and formatting of your messages. The comments within that file contain complete documentation on its usage.</p>
<p>A template file is applied to your message header, subject, and body text. The default template is the included <code>htmlmail.tpl.php</code> file. You may copy this file to your <cite>email theme</cite> directory (selected below), and use it to customize the contents and formatting of your messages. The comments within that file contain complete documentation on its usage.</p>
</li>
<li>
<h3>Theming</h3>
<p><em>(Optional: requires <ahref="http://drupal.org/project/echo">Echo</a> module.)</em> The templated text may be wrapped in a website theme. This lets you use any one of <ahref="http://drupal.org/project/themes">over 800</a> themes to style your messages. Creating an email-specific sub-theme lets you use the full power of the <ahref="http://drupal.org/documentation/theme">drupal theme system</a> to format your messages.</p>
<p>You may choose a theme that will hold your templates from Step 1 above. If the <ahref="http://drupal.org/project/echo">Echo</a> module.) is installed, this theme will also be used to wrap your templated text in a webpage. You use any one of <ahref="http://drupal.org/project/themes">over 800</a> themes to style your messages, or <ahref="http://drupal.org/documentation/theme">create your own</a> for even more power and flexibility.</p>
@@ -38,13 +38,13 @@ function htmlmail_admin_settings() {
'#type'=>'item',
'#suffix'=>t(
// Begin instructions.
'<p>When formatting an email message, Drupal determines the active template directory by looking for <code>htmlmail.tpl.php</code> file in the following locations:</p>
<p>Once the active template directory is found, Drupal looks in that directory for template files in order from most specific to most general.</p>
'<p>When formatting an email message with a given <code>$module</code> and <code>$key</code>, <a href="http://drupal.org/project/htmlmail">HTML Mail</a> will use the first template file it finds from the following list:</p>
<p>For each filename, <a href="http://drupal.org/project/htmlmail">HTML Mail</a> looks first in the chosen <em>Email theme</em> directory, then in its own module directory, before proceeding to the next filename.</p>
<p>For example, if <code>example_module</code> sends mail with:</p>
<p>The <code>$theme_hook_suggestions</code> variable contains an array of suggested <a href="http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/7">theme</a> <a href="http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_theme/7">hooks</a>, in reverse priority order. For the above example, it would contain:</p>
<p>For another example, to customize the <a href="http://api.drupal.org/api/drupal/modules--user--user.pages.inc/function/user_pass_submit/7">password reset</a> messages sent by the <a href="http://api.drupal.org/api/drupal/modules--user--user.module/7">user module</a>, copy <code>htmlmail.tpl.php</code> to your theme directory, and also copy it to <code>htmlmail--user_password_reset.tpl.php</code>, then modify the latter file. Remember that you will need to put <em>both</em> files in your theme directory for this to work.</p>
<p>Template files are cached, so remember to clear the cache by visiting <u>admin/config/development/performance</u> after creating, copying, or editing any <code>.tpl.php</code> files.</p>
<p>The following variables are also available in this template:</p>
<p>For another example, to customize the <a href="http://api.drupal.org/api/drupal/modules--user--user.pages.inc/function/user_pass_submit/7">password reset</a> messages sent by the <a href="http://api.drupal.org/api/drupal/modules--user--user.module/7">user module</a>, copy <a href="http://drupalcode.org/project/htmlmail.git/blob/refs/heads/7.x-2.x:/htmlmail.tpl.php"><code>htmlmail.tpl.php</code></a> to a file called <code>htmlmail--user--password_reset.tpl.php</code> in your <em>Email theme</em> directory, and edit the copy.</p>
<p>Template files are cached, so remember to clear the cache by visiting <u>admin/config/development/performance</u> after changing any <code>.tpl.php</code> files.</p>
<p>The following variables available in this template:</p>
<dl>
<dt><strong><code>$body</code></strong></dt>
<dd>
@@ -120,25 +115,24 @@ function htmlmail_admin_settings() {