ILIAS
Release_4_2_x_branch Revision 61807
|
Public Member Functions | |
Mail_smtp ($params) | |
Constructor. | |
_Mail_smtp () | |
Destructor implementation to ensure that we disconnect from any potentially-alive persistent SMTP connections. | |
send ($recipients, $headers, $body) | |
Implements Mail::send() function using SMTP. | |
& | getSMTPObject () |
Connect to the SMTP server by instantiating a Net_SMTP object. | |
addServiceExtensionParameter ($keyword, $value=null) | |
Add parameter associated with a SMTP service extension. | |
disconnect () | |
Disconnect and destroy the current SMTP connection. | |
_error ($text, &$error) | |
Build a standardized string describing the current SMTP error. | |
Public Member Functions inherited from Mail | |
& | factory ($driver, $params=array()) |
Provides an interface for generating Mail:: objects of various types. | |
_sanitizeHeaders (&$headers) | |
Sanitize an array of mail headers by removing any additional header strings present in a legitimate header's value. | |
prepareHeaders ($headers) | |
Take an array of mail headers and return a string containing text usable in sending a message. | |
parseRecipients ($recipients) | |
Take a set of recipients and parse them, returning an array of bare addresses (forward paths) that can be passed to sendmail or an smtp server with the rcpt to: command. |
Data Fields | |
$_smtp = null | |
$_extparams = array() | |
$host = 'localhost' | |
$port = 25 | |
$auth = false | |
$username = '' | |
$password = '' | |
$localhost = 'localhost' | |
$timeout = null | |
$debug = false | |
Turn on Net_SMTP debugging? | |
$persist = false | |
$pipelining | |
Data Fields inherited from Mail | |
$sep = "\r\n" |
Mail_smtp::_error | ( | $text, | |
& | $error | ||
) |
Build a standardized string describing the current SMTP error.
string | $text | Custom string describing the error context. |
object | $error | Reference to the current PEAR_Error object. |
Definition at line 433 of file smtp.php.
Referenced by getSMTPObject(), and send().
Mail_smtp::_Mail_smtp | ( | ) |
Destructor implementation to ensure that we disconnect from any potentially-alive persistent SMTP connections.
Definition at line 216 of file smtp.php.
References disconnect().
Mail_smtp::addServiceExtensionParameter | ( | $keyword, | |
$value = null |
|||
) |
Add parameter associated with a SMTP service extension.
string | Extension keyword. |
string | Any value the keyword needs. |
Definition at line 398 of file smtp.php.
Referenced by Mail_smtp().
Mail_smtp::disconnect | ( | ) |
Disconnect and destroy the current SMTP connection.
Definition at line 411 of file smtp.php.
Referenced by _Mail_smtp(), and send().
& Mail_smtp::getSMTPObject | ( | ) |
Connect to the SMTP server by instantiating a Net_SMTP object.
Definition at line 342 of file smtp.php.
References $_smtp, $res, _error(), PEAR\isError(), PEAR_MAIL_SMTP_ERROR_AUTH, PEAR_MAIL_SMTP_ERROR_CONNECT, PEAR_MAIL_SMTP_ERROR_CREATE, and PEAR\raiseError().
Referenced by send().
Mail_smtp::Mail_smtp | ( | $params | ) |
Constructor.
Instantiates a new Mail_smtp:: object based on the parameters passed in. It looks for the following parameters: host The server to connect to. Defaults to localhost. port The port to connect to. Defaults to 25. auth SMTP authentication. Defaults to none. username The username to use for SMTP auth. No default. password The password to use for SMTP auth. No default. localhost The local hostname / domain. Defaults to localhost. timeout The SMTP connection timeout. Defaults to none. verp Whether to use VERP or not. Defaults to false. DEPRECATED as of 1.2.0 (use setMailParams()). debug Activate SMTP debug mode? Defaults to false. persist Should the SMTP connection persist? pipelining Use SMTP command pipelining
If a parameter is present in the $params array, it replaces the default.
array | Hash containing any parameters different from the defaults. public |
Definition at line 191 of file smtp.php.
References addServiceExtensionParameter().
Mail_smtp::send | ( | $recipients, | |
$headers, | |||
$body | |||
) |
Implements Mail::send() function using SMTP.
mixed | $recipients | Either a comma-seperated list of recipients (RFC822 compliant), or an array of recipients, each RFC822 valid. This may contain recipients not specified in the headers, for Bcc:, resending messages, etc. |
array | $headers | The array of headers to send with the mail, in an associative array, where the array key is the header name (e.g., 'Subject'), and the array value is the header value (e.g., 'test'). The header produced from those values would be 'Subject: test'. |
string | $body | The full text of the message body, including any MIME parts, etc. |
Reimplemented from Mail.
Definition at line 245 of file smtp.php.
References $res, $result, _error(), Mail\_sanitizeHeaders(), disconnect(), getSMTPObject(), PEAR\isError(), Mail\parseRecipients(), PEAR_MAIL_SMTP_ERROR_DATA, PEAR_MAIL_SMTP_ERROR_FROM, PEAR_MAIL_SMTP_ERROR_RECIPIENT, PEAR_MAIL_SMTP_ERROR_SENDER, Mail\prepareHeaders(), and PEAR\raiseError().
Mail_smtp::$_smtp = null |
Definition at line 82 of file smtp.php.
Referenced by getSMTPObject().
boolean Mail_smtp::$debug = false |