Mail::factory()

Mail::factory() -- creates a mailer instance

Synopsis

require_once 'Mail.php';

object &factory (string $backend [, array $params = array()])

Description

Creates a instance of a backend-specific mailer class.

Parameter

Return value

object - a specific Mail instance or a PEAR_Error object, if fails

Throws

Table 46-1. Possible PEAR_Error values

Error codeError messageReasonSolution
NULL "Unable to find class for driver xxx" Mailer backend class was not found. Check the $backend parameter, if correct reinstall and/or update your Mail package.

Note

This function should be called statically.

See

"Introduction"