ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
& | factory ($driver, $params=array()) |
Provides an interface for generating Mail:: objects of various types. | |
send ($recipients, $headers, $body) | |
Implements Mail::send() function using php's built-in mail() command. | |
_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 | |
$sep = "\r\n" |
Mail::_sanitizeHeaders | ( | & | $headers | ) |
Sanitize an array of mail headers by removing any additional header strings present in a legitimate header's value.
The goal of this filter is to prevent mail injection attacks.
array | $headers | The associative array of headers to sanitize. |
private
Definition at line 153 of file Mail.php.
Referenced by Mail_sendmail\send(), send(), Mail_mail\send(), Mail_smtp\send(), and Mail_smtpmx\send().
& Mail::factory | ( | $driver, | |
$params = array() |
|||
) |
Provides an interface for generating Mail:: objects of various types.
string | $driver | The kind of Mail:: object to instantiate. |
array | $params | The parameters to pass to the Mail:: object. |
Definition at line 74 of file Mail.php.
References PEAR\raiseError().
Mail::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.
mixed | Either a comma-seperated list of recipients (RFC822 compliant), or an array of recipients, each RFC822 valid. |
Definition at line 240 of file Mail.php.
References Mail_RFC822\parseAddressList().
Referenced by Mail_sendmail\send(), Mail_smtp\send(), and Mail_smtpmx\send().
Mail::prepareHeaders | ( | $headers | ) |
Take an array of mail headers and return a string containing text usable in sending a message.
array | $headers | The array of headers to prepare, in an associative array, where the array key is the header name (ie, 'Subject'), and the array value is the header value (ie, 'test'). The header produced from those values would be 'Subject: test'. |
Definition at line 178 of file Mail.php.
Referenced by Mail_sendmail\send(), send(), Mail_mail\send(), Mail_smtp\send(), and Mail_smtpmx\send().
Mail::send | ( | $recipients, | |
$headers, | |||
$body | |||
) |
Implements Mail::send() function using php's built-in mail() command.
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 (ie, 'Subject'), and the array value is the header value (ie, '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. |
public
Reimplemented in Mail_smtpmx, Mail_smtp, Mail_mock, Mail_mail, Mail_sendmail, and Mail_null.
Definition at line 114 of file Mail.php.
References $result, _sanitizeHeaders(), prepareHeaders(), and PEAR\raiseError().