README.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <h2><a href="http://drupal.org/project/htmlmail">HTML Mail</a></h2>
  2. <p>Lets you theme your messages the same way you theme the rest of your website.</p>
  3. <h3><a href="http://www.dict.org/bin/Dict?Form=Dict2&amp;Database=*&amp;Query=requirement">Requirement</a></h3>
  4. <ul>
  5. <li><a href="http://drupal.org/project/mailsystem">Mail System 7.x-2.x</a></li>
  6. </ul>
  7. <h3><a href="http://drupal.org/documentation/install/modules-themes/modules-7">Installation</a></h3>
  8. <p>The following additional modules, while not required, are highly recommended:</p>
  9. <ul>
  10. <li>
  11. <dl>
  12. <dt><a href="http://drupal.org/project/echo">Echo</a></dt>
  13. <dd>Wraps your messages in a drupal theme. Now you can "brand" your messages with the same logo, header, fonts, and styles as your website.</dd>
  14. </dl>
  15. </li>
  16. <li>
  17. <dl>
  18. <dt><a href="http://drupal.org/project/emogrifier">Emogrifier</a></dt>
  19. <dd>Converts stylesheets to inline style rules, for consistent display on mobile devices and webmail.</dd>
  20. </dl>
  21. </li>
  22. <li>
  23. <dl>
  24. <dt><a href="http://drupal.org/project/mailmime">Mail MIME</a></dt>
  25. <dd>Provides a text/plain alternative to text/html emails, and automatically converts image references to inline image attachments.</dd>
  26. </dl>
  27. </li>
  28. <li>
  29. <dl>
  30. <dt><a href="http://drupal.org/project/pathologic">Pathologic</a></dt>
  31. <dd>Converts urls from relative to absolute, so clickable links in your email messages work as intended.</dd>
  32. </dl>
  33. </li>
  34. <li>
  35. <dl>
  36. <dt><a href="http://drupal.org/project/filter_transliteration">Transliteration</a></dt>
  37. <dd>
  38. <p>Converts non-ASCII characters to their US-ASCII equivalents, such as from Microsoft "smart-quotes" to regular quotes.</p>
  39. </dd>
  40. <dd>
  41. <p><em>Also available as a <a href="http://drupal.org/node/1095278#comment-4219530">patch</a>.</em></p>
  42. </dd>
  43. </dl>
  44. </li>
  45. </ul>
  46. <h3><a href="http://drupal.org/node/250790">Updating from previous versions</a></h3>
  47. <p>The <a href="http://drupal.org/node/1106064">7.x-2.x</a> branch shares 94% of its code with the <a href="http://drupal.org/node/1119548">6.x-2.x</a> branch, but only 15% of its code with the <a href="http://drupal.org/node/355250">7.x-1.x</a> branch, and a tiny 8% of its code with the <a href="http://drupal.org/node/329828">6.x-1.x</a> branch.</p>
  48. <p>Let your compatibility expectations be adjusted accordingly.</p>
  49. <ul>
  50. <li>
  51. <p>Check the module dependencies, as they have changed. The latest version of <a href="http://drupal.org/project/htmlmail">HTML Mail</a> depends on the <a href="http://drupal.org/project/mailsystem">Mail System</a> module (7.x-2.2 or later) and will not work without it.</p>
  52. </li>
  53. <li>
  54. <p>Run <code>update.php</code> <em>immediately</em> after uploading new code.</p>
  55. </li>
  56. <li>
  57. <p>The user-interface for adding email header and footer text has been removed. Headers and footers may be added by template files and/or by enabling the <a href="http://drupal.org/project/echo">Echo</a> module.</p>
  58. </li>
  59. <li>
  60. <p>Any customized filters should be carefully tested, as some of the template variables have changed. Full documentation is provided both on the module configuration page (Click on the <u>Instructions</u> link) and as comments within the <code>htmlmail.tpl.php</code> file itself.</p>
  61. </li>
  62. <li>
  63. <p>The following options have been removed from the module settings page. In their place, any combination of <a href="http://drupal.org/project/modules/?filters=type%3Aproject_project%20tid%3A63%20hash%3A1hbejm%20-bs_project_sandbox%3A1%20bs_project_has_releases%3A1">over 200 filter modules</a> may be used to create an email-specific <a href="http://drupal.org/node/778976">text format</a> for post-template filtering.</p>
  64. <ul>
  65. <li><a href="http://api.drupal.org/api/drupal/modules--filter--filter.module/function/_filter_autop/7">Line break converter</a></li>
  66. <li><a href="http://api.drupal.org/api/drupal/modules--filter--filter.module/function/_filter_url/7">URL Filter</a></li>
  67. <li><a href="http://drupal.org/project/rel_to_abs">Relative Path to Absolute URLs</a></li>
  68. <li><a href="http://www.pelagodesign.com/sidecar/emogrifier/">Emogrifier</a></li>
  69. <li><a href="http://drupal.org/project/token">Token support</a></li>
  70. </ul>
  71. </li>
  72. <li>
  73. <p>Full MIME handling, including automatic generation of a plaintext alternative part and conversion of image references to inline image attachments, is available simply by enabling the <a href="http://drupal.org/project/mailmime">Mail MIME</a> module.</p>
  74. </li>
  75. </ul>
  76. <h3><a href="http://drupal.org/files/images/htmlmail_settings_2.thumbnail.png">Configuration</a></h3>
  77. <p>Visit the <a href="http://drupal.org/project/mailsystem">Mail System</a> settings page at <u>admin/config/system/mailsystem</u> to select which parts of Drupal will use <a href="http://drupal.org/project/htmlmail">HTML Mail</a> instead of the <a href="http://api.drupal.org/api/drupal/modules--system--system.mail.inc/class/DefaultMailSystem/7">default</a> <a href="http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail_system/7">mail system</a>.</p>
  78. <p>Visit the <a href="http://drupal.org/project/htmlmail">HTML Mail</a> settings page at <u>admin/config/system/htmlmail</u> to select a theme and post-filter for your messages.</p>
  79. <h3><a href="http://drupal.org/documentation/theme">Theming</a></h3>
  80. <p>The email message text goes through three transformations before sending:</p>
  81. <ol style="list-style-type: decimal;">
  82. <li>
  83. <h3>Template File</h3>
  84. <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>
  85. </li>
  86. <li>
  87. <h3>Theming</h3>
  88. <p>You may choose a theme that will hold your templates from Step 1 above. If the <a href="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 <a href="http://drupal.org/project/themes">over 800</a> themes to style your messages, or <a href="http://drupal.org/documentation/theme">create your own</a> for even more power and flexibility.</p>
  89. </li>
  90. <li>
  91. <h3>Post-filtering</h3>
  92. <p>You may choose a <a href="http://drupal.org/node/778976">text format</a> to be used for filtering email messages <em>after</em> theming. This allows you to use any combination of <a href="http://drupal.org/project/modules/?filters=type%3Aproject_project%20tid%3A63%20hash%3A1hbejm%20-bs_project_sandbox%3A1%20bs_project_has_releases%3A1">over 200 filter modules</a> to make final changes to your message before sending.</p>
  93. <p>Here is a recommended configuration:</p>
  94. <ul>
  95. <li>
  96. <p><a href="http://drupal.org/project/emogrifier">Emogrifier</a> Converts stylesheets to inline style rules for consistent display on mobile devices and webmail.</p>
  97. </li>
  98. <li>
  99. <p><a href="http://drupal.org/project/filter_transliteration">Transliteration</a> Converts non-ASCII text to US-ASCII equivalents. This helps prevent Microsoft "smart-quotes" from appearing as question-marks in Mozilla Thunderbird.</p>
  100. </li>
  101. <li>
  102. <p><a href="http://drupal.org/project/pathologic">Pathologic</a> Converts relative URLS to absolute URLS so that clickable links in your message will work as intended.</p>
  103. </li>
  104. </ul>
  105. </li>
  106. </ol>
  107. <h3>Troubleshooting</h3>
  108. <ul>
  109. <li>
  110. <p>Double-check the <a href="http://drupal.org/project/mailsystem">Mail System</a> module settings and and make sure you selected <u><code>HTMLMailSystem</code></u> for your <u>Site-wide default mail system</u>.</p>
  111. </li>
  112. <li>
  113. <p>Try selecting the <u><code>[ ]</code> <em>(Optional)</em> Debug</u> checkbox at the <a href="http://drupal.org/project/htmlmail">HTML Mail</a> module settings page and re-sending your message.</p>
  114. </li>
  115. <li>
  116. <p>Clear your cache after changing any <u><code>.tpl.php</code></u> files.</p>
  117. </li>
  118. <li>
  119. <p>If you use a post-filter, make sure your filter settings page looks like <a href="http://drupal.org/node/1130960">this</a>.</p>
  120. </li>
  121. <li>
  122. <p>Visit the <a href="http://drupal.org/project/issues/htmlmail">issue queue</a> for support and feature requests.</p>
  123. </li>
  124. </ul>
  125. <h3>Related Modules</h3>
  126. <dl>
  127. <dt><strong>Echo</strong></dt>
  128. <dd>
  129. <p>http://drupal.org/project/echo</p>
  130. </dd>
  131. <dt><strong>Emogrifier</strong></dt>
  132. <dd>
  133. <p>http://drupal.org/project/emogrifier</p>
  134. </dd>
  135. <dt><strong>HTML Purifier</strong></dt>
  136. <dd>
  137. <p>http://drupal.org/project/htmlpurifier</p>
  138. </dd>
  139. <dt><strong>htmLawed</strong></dt>
  140. <dd>
  141. <p>http://drupal.org/project/htmlawed</p>
  142. </dd>
  143. <dt><strong>Mail MIME</strong></dt>
  144. <dd>
  145. <p>http://drupal.org/project/mailmime</p>
  146. </dd>
  147. <dt><strong>Mail System</strong></dt>
  148. <dd>
  149. <p>http://drupal.org/project/mailsystem</p>
  150. </dd>
  151. <dt><strong>Pathologic</strong></dt>
  152. <dd>
  153. <p>http://drupal.org/project/pathologic</p>
  154. </dd>
  155. <dt><strong>Transliteration</strong></dt>
  156. <dd>
  157. <p>http://drupal.org/project/transliteration</p>
  158. </dd>
  159. </dl>
  160. <h3><a href="http://drupal.org/project/documentation">Documentation</a></h3>
  161. <dl>
  162. <dt><strong><a href="http://api.drupal.org/api/drupal/modules--filter--filter.module/6">filter.module</a></strong></dt>
  163. <dd><a href="http://api.drupal.org/api/drupal/modules--filter--filter.module/7">api.drupal.org/api/drupal/modules--filter--filter.module</a></dd>
  164. <dd>
  165. <p><a href="http://api.drupal.org/api/drupal/modules--filter--filter.module/group/standard_filters/7">api.drupal.org/api/drupal/modules--filter--filter.module/group/standard_filters/7</a></p>
  166. </dd>
  167. <dt><strong><a href="http://drupal.org/documentation/install/modules-themes/modules-7">Installing contributed modules</a></strong></dt>
  168. <dd>
  169. <p><a href="http://drupal.org/documentation/install/modules-themes/modules-7">drupal.org/documentation/install/modules-themes/modules-7</a></p>
  170. </dd>
  171. <dt><strong><a href="http://drupal.org/documentation/theme">Theming guide</a></strong></dt>
  172. <dd>
  173. <p><a href="http://drupal.org/documentation/theme">drupal.org/documentation/theme</a></p>
  174. </dd>
  175. </dl>
  176. <h3>Original Author</h3>
  177. <ul>
  178. <li><a href="http://drupal.org/user/1171">Chris Herberte</a></li>
  179. </ul>
  180. <h3>Current Maintainer</h3>
  181. <ul>
  182. <li><a href="http://drupal.org/user/36148">Bob Vincent</a></li>
  183. </ul>