$sep
$sep : string
Line terminator used for separating header lines.
Sendmail interface.
send(mixed $recipients, array $headers, mixed $body)
Send a message.
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 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'. If the '_raw' key exists, the value of this key will be used as the exact text for sending the message. |
mixed | $body | The full text of the message body, including any Mime parts, etc. Either a string or a stream resource. |
prepareHeaders(array $headers) : mixed
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'. If the '_raw' key exists, the value of this key will be used as the exact text for sending the message. |
Returns false if it encounters a bad address; otherwise returns an array containing two elements: Any From: address found in the headers, and the plain text version of the headers.
parseRecipients(mixed $recipients) : array
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 | $recipients | Either a comma-separated list of recipients (RFC822 compliant), or an array of recipients, each RFC822 valid. |
Forward paths (bare addresses, IDN encoded).
__construct(array $params = array())
Constructor.
array | $params | Additional parameters:
|
_sanitizeHeaders(array $headers) : array
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.
Raw headers are sent as-is.
array | $headers | The associative array of headers to sanitize. |
The sanitized headers.