object &factory (string $backend [, array $param = array()])
object &factory
Creates a instance of a backend-specific mailer class.
string $backend - the name of the backend "mail","smtp", "sendmail"
array $param - a array of backend specific parameters.
List of parameter for the backends
mail
no additional options
sendmail
$param["sendmail_path"] - The location of the sendmail program on the filesystem. Default is /usr/bin/sendmail
$param["sendmail_args"] - Additional parameters to pass to the sendmail program.
smtp
$param["host"] - The server to connect. Default is localhost
$param["port"] - The port to connect. Default is 25
$param["auth"] - Whether or not to use SMTP authentication. Default is FALSE
$param["username"] - The username to use for SMTP authentication.
$param["password"] - The password to use for SMTP authentication.
object - a specific Mail instance or a PEAR_Error object, if fails
Table 29-1. Possible PEAR_Error values
This function should be called statically.
"Introduction"