SMTP_MIME_CRLF
SMTP_MIME_CRLF = "\r\n"
Class to provide SMTP functionality using PEAR Net_SMTP
send_mail(string $from, mixed $recipients, mixed $headers, mixed $body, array $opts = []) : bool
Function for sending mail
| string | $from | Sender e-Mail address |
| mixed | $recipients | Either a comma-separated 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. |
| mixed | $headers | The message headers to send with the mail Either as an associative array or a finally formatted string |
| mixed | $body | The full text of the message body, including any Mime parts or file handle |
| array | $opts | Delivery options (e.g. DSN request) |
True on success, or False on error
_prepare_headers(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'. |
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.
_parse_rfc822(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. |
An array of forward paths (bare addresses).