You are here

README.txt in Mime Mail 8

Same filename in this branch
  1. 8 README.txt
  2. 8 modules/mimemail_example/README.txt
Same filename and directory in other branches
  1. 5 README.txt
  2. 6 README.txt
  3. 7 README.txt
-- SUMMARY --

This is a Mime Mail component module (for use by other modules).
 * It permits users to receive HTML email and can be used by other modules.
   The mail functionality accepts an HTML message body, MIME-encodes it and
   sends it.
 * If the HTML has embedded graphics, these graphics are MIME-encoded and
   included as message attachments.
 * Adopts your site's style by automatically including your theme's stylesheet
   files in a themeable HTML message format.
 * If the recipient's preference is available and they prefer plaintext, the
   HTML will be converted to plain text and sent as-is. Otherwise, the email
   will be sent in themeable HTML with a plaintext alternative.

For a full description of the module, visit the project page:
  http://drupal.org/project/mimemail

To submit bug reports and feature suggestions, or to track changes:
  http://drupal.org/project/issues/mimemail


-- REQUIREMENTS --

Mail System module - http://drupal.org/project/mailsystem


-- INSTALLATION --

Hopefully, you know the drill by now :)
 1. Download the module and extract the files.
 2. Upload the entire mimemail folder into your Drupal sites/all/modules/
    or sites/my.site.folder/modules/ directory if you are running a multi-site
    installation of Drupal and you want this module to be specific to a
    particular site in your installation.
 3. Enable the Mime Mail module by navigating to:
    Administration > Modules
 4. Adjust settings by navigating to:
    Administration > Configuration > Mime Mail


-- USAGE --

This module may be required by other modules, but in favor of the recently
added system actions and Rules integration, it can be useful by itself too.

Once installed, any module can send MIME-encoded messages by specifying
MimeMailSystem as the responsible mail system for a particular message
or all mail sent by one module.

This can be done through the web by visiting admin/config/system/mailsystem
or in a program as follows:

  mailsystem_set([
    '{$module}_{$key}' => 'MimeMailSystem', // Just messages with $key sent by $module.
    '{$module}' => 'MimeMailSystem', // All messages sent by $module.
  ]);

You can use the following optional parameters to build the email:
 - plain: Boolean, whether to send messages in plaintext-only
   (optional, default is FALSE).
 - plaintext: Plaintext portion of a multipart email (optional).
 - attachments: Array of arrays with the path or content, name and MIME type
   of the file (optional).
 - headers: A keyed array with headers (optional).

You can set these in $params either before MailManager::mail() or in hook_mail()
or of course in hook_mail_alter().

Normally, Mime Mail uses email addresses in the form "name" <address@host.com>,
but PHP running on Windows servers requires extra SMTP handling to use this
format.  If you are running your site on a Windows server and don't have an
SMTP solution such as the SMTP module installed, you may need to set the
'Use the simple format of user@example.com for all email addresses' option on
the configuration settings page.

This module creates a user preference for receiving plaintext-only messages.
This preference will be honored by all messages if the format is not explicitly
set and the user has access to edit this preference (allowed by default).

Email messages are formatted using the mimemail-message.html.twig template.
This includes a CSS style sheet and uses an HTML version of the text.
The included CSS is either:
 * The mail.css file found anywhere in your theme folder or
 * The combined CSS style sheets of your theme if enabled.

Since some email clients (namely Outlook 2007 and GMail) is tend to only regard
inline CSS, you can use the Compressor to convert CSS styles into inline style
attributes. It transmogrifies the HTML source by parsing the CSS and inserting
the CSS definitions into tags within the HTML based on the CSS selectors. To
use the Compressor, just enable it.

To create a custom mail template copy the mimemail-message.html.twig file from
the mimemail/templates directory into your default theme's folder. Both general
and by-mailkey theming can be performed:
 * mimemail-message--[module]--[key].html.twig
   (for messages with a specific module and key)
 * mimemail-message--[module].html.twig
   (for messages with a specific module)
 * mimemail-message.html.twig
   (for all messages)

Messages can be rendered using different themes. You can choose the following
settings to render the email:
  'current': Theme currently used by the user who runs drupal_mail().
  'default': Default theme, obtained via variable theme_default.
  'domain': Theme obtained via Domain Theme module.
or any other active theme.

Images with absolute URL will be available as remote content. To embed images
into emails you have to use a relative URL or an internal path. Due to security
concerns, only files residing in the public file system
(e.g sites/default/files) can be used by default.

For example:
  instead of http://www.mysite.com/sites/default/files/mypicture.jpg
  use /home/www/public_html/drupal/sites/default/files/mypicture.jpg
   or /sites/default/files/mypicture.jpg
   or public://mypicture.jpg

The 'send arbitrary files' permission allows you to attach or embed files
located outside Drupal's public files directory. Note that this has security
implications: arbitrary includes even your settings.php! Give to trusted roles
only!


-- CREDITS --

MAINTAINER: Allie Micka < allie at pajunas dot com >

 * Allie Micka
   Mime enhancements and HTML mail code

 * Gerhard Killesreiter
   Original mail and MIME code

 * Robert Castelo
   HTML to Text and other functionality

File

README.txt
View source
  1. -- SUMMARY --
  2. This is a Mime Mail component module (for use by other modules).
  3. * It permits users to receive HTML email and can be used by other modules.
  4. The mail functionality accepts an HTML message body, MIME-encodes it and
  5. sends it.
  6. * If the HTML has embedded graphics, these graphics are MIME-encoded and
  7. included as message attachments.
  8. * Adopts your site's style by automatically including your theme's stylesheet
  9. files in a themeable HTML message format.
  10. * If the recipient's preference is available and they prefer plaintext, the
  11. HTML will be converted to plain text and sent as-is. Otherwise, the email
  12. will be sent in themeable HTML with a plaintext alternative.
  13. For a full description of the module, visit the project page:
  14. http://drupal.org/project/mimemail
  15. To submit bug reports and feature suggestions, or to track changes:
  16. http://drupal.org/project/issues/mimemail
  17. -- REQUIREMENTS --
  18. Mail System module - http://drupal.org/project/mailsystem
  19. -- INSTALLATION --
  20. Hopefully, you know the drill by now :)
  21. 1. Download the module and extract the files.
  22. 2. Upload the entire mimemail folder into your Drupal sites/all/modules/
  23. or sites/my.site.folder/modules/ directory if you are running a multi-site
  24. installation of Drupal and you want this module to be specific to a
  25. particular site in your installation.
  26. 3. Enable the Mime Mail module by navigating to:
  27. Administration > Modules
  28. 4. Adjust settings by navigating to:
  29. Administration > Configuration > Mime Mail
  30. -- USAGE --
  31. This module may be required by other modules, but in favor of the recently
  32. added system actions and Rules integration, it can be useful by itself too.
  33. Once installed, any module can send MIME-encoded messages by specifying
  34. MimeMailSystem as the responsible mail system for a particular message
  35. or all mail sent by one module.
  36. This can be done through the web by visiting admin/config/system/mailsystem
  37. or in a program as follows:
  38. mailsystem_set([
  39. '{$module}_{$key}' => 'MimeMailSystem', // Just messages with $key sent by $module.
  40. '{$module}' => 'MimeMailSystem', // All messages sent by $module.
  41. ]);
  42. You can use the following optional parameters to build the email:
  43. - plain: Boolean, whether to send messages in plaintext-only
  44. (optional, default is FALSE).
  45. - plaintext: Plaintext portion of a multipart email (optional).
  46. - attachments: Array of arrays with the path or content, name and MIME type
  47. of the file (optional).
  48. - headers: A keyed array with headers (optional).
  49. You can set these in $params either before MailManager::mail() or in hook_mail()
  50. or of course in hook_mail_alter().
  51. Normally, Mime Mail uses email addresses in the form "name" ,
  52. but PHP running on Windows servers requires extra SMTP handling to use this
  53. format. If you are running your site on a Windows server and don't have an
  54. SMTP solution such as the SMTP module installed, you may need to set the
  55. 'Use the simple format of user@example.com for all email addresses' option on
  56. the configuration settings page.
  57. This module creates a user preference for receiving plaintext-only messages.
  58. This preference will be honored by all messages if the format is not explicitly
  59. set and the user has access to edit this preference (allowed by default).
  60. Email messages are formatted using the mimemail-message.html.twig template.
  61. This includes a CSS style sheet and uses an HTML version of the text.
  62. The included CSS is either:
  63. * The mail.css file found anywhere in your theme folder or
  64. * The combined CSS style sheets of your theme if enabled.
  65. Since some email clients (namely Outlook 2007 and GMail) is tend to only regard
  66. inline CSS, you can use the Compressor to convert CSS styles into inline style
  67. attributes. It transmogrifies the HTML source by parsing the CSS and inserting
  68. the CSS definitions into tags within the HTML based on the CSS selectors. To
  69. use the Compressor, just enable it.
  70. To create a custom mail template copy the mimemail-message.html.twig file from
  71. the mimemail/templates directory into your default theme's folder. Both general
  72. and by-mailkey theming can be performed:
  73. * mimemail-message--[module]--[key].html.twig
  74. (for messages with a specific module and key)
  75. * mimemail-message--[module].html.twig
  76. (for messages with a specific module)
  77. * mimemail-message.html.twig
  78. (for all messages)
  79. Messages can be rendered using different themes. You can choose the following
  80. settings to render the email:
  81. 'current': Theme currently used by the user who runs drupal_mail().
  82. 'default': Default theme, obtained via variable theme_default.
  83. 'domain': Theme obtained via Domain Theme module.
  84. or any other active theme.
  85. Images with absolute URL will be available as remote content. To embed images
  86. into emails you have to use a relative URL or an internal path. Due to security
  87. concerns, only files residing in the public file system
  88. (e.g sites/default/files) can be used by default.
  89. For example:
  90. instead of http://www.mysite.com/sites/default/files/mypicture.jpg
  91. use /home/www/public_html/drupal/sites/default/files/mypicture.jpg
  92. or /sites/default/files/mypicture.jpg
  93. or public://mypicture.jpg
  94. The 'send arbitrary files' permission allows you to attach or embed files
  95. located outside Drupal's public files directory. Note that this has security
  96. implications: arbitrary includes even your settings.php! Give to trusted roles
  97. only!
  98. -- CREDITS --
  99. MAINTAINER: Allie Micka < allie at pajunas dot com >
  100. * Allie Micka
  101. Mime enhancements and HTML mail code
  102. * Gerhard Killesreiter
  103. Original mail and MIME code
  104. * Robert Castelo
  105. HTML to Text and other functionality