Drupal: Sending email without an SMTP Server configured in PHP

Based on the assumption that most Drupal installations are done on Unix or Linux/LAMP plateforms, there is not enough information on how to implement the email function when installation on Windows or any other Operating System that does not have the Send-mail engine that is classic of Linux and other Unix-like operating systems.

Drupal is dependent on the email feature to be able to send passwords to new users (unless you are using Login Toboggan to modify the registration and login procedure; in which case you can have users choose a password on account creation). Also, users may loose their passwords and it's not an option to have them send the admin an email to reset the passwords manually. Much as the admin may always have access to user account information, it is not a good showing to have your users contact you directly and openly know that you have their access credentials un-encrypted.

In Windows, one can either set an SMTP server in php.ini, or configure Drupal to use a php application/function to relay email messages.

Drupal Solution

If you have access to an SMTP server (with or without authentication), the SMTP Drupal module has been able to serve the purpose that Sendmail would server in a Linux setup by relaying outgoing email via one of my SMTP servers or by using a PHP- mail component.

If you do not have access to an SMTP server or you are having trouble connecting to it, you can use the PHPmailer module as detailed and explained in this Drupal support forumn article: http://drupal.org/node/54952
or using the SMTP class: http://drupal.org/node/29888

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Drupal Smtp Authentication with PEAR

I've written a few lines on how to use PEAR:Mail with Drupal. You might find it usefull.

Valid XHTML 1.0 Strict
This site is accepts Oped ID authentication for login
This Website is Built Using Semantic Markup and Cascading Style Sheets (CSS)
Some usage rights are reserved, please contact us for approval before using it