Contact Form Processing Products - for all your needs

FormMail • Form Encryption • Hosted Forms

PEAR Settings

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.


Configure FormMail to use PEAR for mailing instead of the PHP "mail" function.


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. "" 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:

Default Value



$PEAR_SMTP_PWD = "xyzabc1234";

See Also