You are here

README.txt in PHPMailer SMTP 2.x

Same filename and directory in other branches
  1. 8 README.txt
INTRODUCTION
------------

Uses the PHPMailer library to send emails via SMTP.

For a full description of the module, visit the project page:
  http://drupal.org/project/phpmailer_smtp
To submit bug reports and feature suggestions, or to track changes:
  http://drupal.org/project/issues/phpmailer_smtp

REQUIREMENTS
------------

* Access to an SMTP server

* The Mail System module. This allows you specify different backends for
  formatting and sending e-mails
  http://www.drupal.org/project/mailsystem

* PHPMailer library 6 - installed via composer

Optional:

* To connect to an SMTP server using SSL/TLS, your PHP installation needs to
  have SSL support.

* Mime Mail module to format HTML emails
  http://www.drupal.org/project/mimemail

* Swift Mailer module to format HTML emails
  https://www.drupal.org/project/swiftmailer

INSTALLATION
------------

composer require drupal/phpmailer_smtp

CONFIGURATION
-------------

* Configure user permissions at Administer >> User management >> Access
  control >> PHPMailer SMTP module.

  Only users with the "administer phpmailer smtp settings" permission are
  allowed to access the module configuration page.

* Configure your SMTP server settings at Administer >> Configuration >>
  PHPMailer SMTP.

* Configure your Mail System settings at Administer >> Configuration >>
  Mail System.

  Select "PHPMailer SMTP" as "Sender" under "Default Mail System" and "Module-
  Specific Configuration" as required.

EXAMPLES
--------

* Using Google Mail or Google Apps as SMTP server

  To send e-mails with Google Mail use the following settings:

    SMTP server:     smtp.gmail.com
    SMTP port:       587
    Secure protocol: TLS
    Username:        your_google_mail_name@gmail.com
      or:            your_username@your_google_apps_domain.com
    Password:        your_google_mail_password

  In Advanced SMTP settings:
    Enable 'Always set "Reply-To" address' checkbox.

  Also note the sending limits for Google Mail accounts:
  http://mail.google.com/support/bin/answer.py?hl=en&answer=22839

  General instructions for Google Mail accounts:
  http://mail.google.com/support/bin/answer.py?answer=13287

* Errors when trying to send a test email

  If you see the following error messages when trying to send a test email from
  the settings page:

    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
    SMTP Error: Could not connect to SMTP host. 

  it means the mail server can not be reached, usually because your hosting
  provider is blocking the port by a firewall. The solution is to ask your
  provider to allow outgoing connections to your mail server.

* Debug settings

  PHPMailer SMTP supports rerouting all e-mails for debugging purposes, to
  prevent you from accidentally sending out e-mails to real users from a
  development site.  To enable this feature, add the following lines to the end
  of your settings.php (usually located in sites/default):

    $conf['system.maintenance']['phpmailer_smtp_debug_email']
      = 'your_debug_email@yoursite.com';

  This will change the recipient of all e-mails to the configured address.

File

README.txt
View source
  1. INTRODUCTION
  2. ------------
  3. Uses the PHPMailer library to send emails via SMTP.
  4. For a full description of the module, visit the project page:
  5. http://drupal.org/project/phpmailer_smtp
  6. To submit bug reports and feature suggestions, or to track changes:
  7. http://drupal.org/project/issues/phpmailer_smtp
  8. REQUIREMENTS
  9. ------------
  10. * Access to an SMTP server
  11. * The Mail System module. This allows you specify different backends for
  12. formatting and sending e-mails
  13. http://www.drupal.org/project/mailsystem
  14. * PHPMailer library 6 - installed via composer
  15. Optional:
  16. * To connect to an SMTP server using SSL/TLS, your PHP installation needs to
  17. have SSL support.
  18. * Mime Mail module to format HTML emails
  19. http://www.drupal.org/project/mimemail
  20. * Swift Mailer module to format HTML emails
  21. https://www.drupal.org/project/swiftmailer
  22. INSTALLATION
  23. ------------
  24. composer require drupal/phpmailer_smtp
  25. CONFIGURATION
  26. -------------
  27. * Configure user permissions at Administer >> User management >> Access
  28. control >> PHPMailer SMTP module.
  29. Only users with the "administer phpmailer smtp settings" permission are
  30. allowed to access the module configuration page.
  31. * Configure your SMTP server settings at Administer >> Configuration >>
  32. PHPMailer SMTP.
  33. * Configure your Mail System settings at Administer >> Configuration >>
  34. Mail System.
  35. Select "PHPMailer SMTP" as "Sender" under "Default Mail System" and "Module-
  36. Specific Configuration" as required.
  37. EXAMPLES
  38. --------
  39. * Using Google Mail or Google Apps as SMTP server
  40. To send e-mails with Google Mail use the following settings:
  41. SMTP server: smtp.gmail.com
  42. SMTP port: 587
  43. Secure protocol: TLS
  44. Username: your_google_mail_name@gmail.com
  45. or: your_username@your_google_apps_domain.com
  46. Password: your_google_mail_password
  47. In Advanced SMTP settings:
  48. Enable 'Always set "Reply-To" address' checkbox.
  49. Also note the sending limits for Google Mail accounts:
  50. http://mail.google.com/support/bin/answer.py?hl=en&answer=22839
  51. General instructions for Google Mail accounts:
  52. http://mail.google.com/support/bin/answer.py?answer=13287
  53. * Errors when trying to send a test email
  54. If you see the following error messages when trying to send a test email from
  55. the settings page:
  56. SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
  57. SMTP Error: Could not connect to SMTP host.
  58. it means the mail server can not be reached, usually because your hosting
  59. provider is blocking the port by a firewall. The solution is to ask your
  60. provider to allow outgoing connections to your mail server.
  61. * Debug settings
  62. PHPMailer SMTP supports rerouting all e-mails for debugging purposes, to
  63. prevent you from accidentally sending out e-mails to real users from a
  64. development site. To enable this feature, add the following lines to the end
  65. of your settings.php (usually located in sites/default):
  66. $conf['system.maintenance']['phpmailer_smtp_debug_email']
  67. = 'your_debug_email@yoursite.com';
  68. This will change the recipient of all e-mails to the configured address.