Mail Configuration

By default, Drupal sends email using the built-in PHP mail() command. The behavior of this command varies from operating system to operating system. For example, on Linux (by default) a call to mail() will invoke the sendmail command-line program. When PHP is running on Windows, in contrast, PHP will create direct SMTP socket connections to a mail server.

To configure how your system sends mail, you can edit your php.ini file.

The PHP mail() function has its limits, though and sometimes it is desirable to use an alternative mail library.

Drupal 6 allows extensions to the mail system. This is done by creating a custom mail library (not necessarily in the form of a module) which contains the drupal_mail_ wrapper() function. By setting the value of the configuration variable smtp_library to point to the location of this mail library, you can cause Drupal to send mail through that library instead of through PHP's mail() function.

The best source of information on this is the well-documented Drupal I

source code for drupal/includes/, particularly the function I

drupal_mail_send(). I

For our purposes, we will be using Drupal's default configuration.

Was this article helpful?

0 0

Post a comment