This page documents the PEAR Settings configuration setting in FormMail.
Type Of Setting
PEAR Settings is an OPTIONAL setting, which means...
OPTIONAL : you can change this setting if you need to, but the default value is fine for most circumstances.
Précis
Configure FormMail to use PEAR for mailing instead of the PHP "mail" function.
Description
If you need to use an outgoing mail server other than the one configured directly for PHP, and your PHP installation has PEAR support, you can configure FormMail to use PEAR's "Mail" object to send mail.
To do this, you need to set PEAR_SMTP_HOST to the name of the outgoing mail server. The default port for SMTP is 25, but you can specify a different one if required. If you don't need authentication, leave PEAR_SMTP_USER blank, otherwise, set it to the user name and set PEAR_SMTP_PWD to the required password.
Note that servers frequently require a complete email address for PEAR_SMTP_USER (e.g. "russellr@rootsoftware.com" instead of just "russellr").
When using PEAR, emails seem to require a sender (a 'From' address). Therefore, you may need to set FROM_USER to get alert messages to work.
Note that with PEAR mailing enabled, the SendMailFOption "mail_options" setting is ignored (and so is SENDMAIL_F_OPTION).
Test your PEAR settings with the "testalert" feature:
http://yoursite.com/formmail.php?testalert=1
Default Value
$PEAR_SMTP_HOST = "";
$PEAR_SMTP_PORT = 25;
$PEAR_SMTP_USER = "";
$PEAR_SMTP_PWD = "";
Examples
$PEAR_SMTP_HOST = "mail.yourserver.co";
$PEAR_SMTP_PORT = 25;
$PEAR_SMTP_USER = "youremail@yourserver.co";
$PEAR_SMTP_PWD = "xyzabc1234";