rcube_smtp

Class to provide SMTP functionality using PEAR Net_SMTP

package

Framework

subpackage

Mail

author

Thomas Bruederli

author

Aleksander Machniak

Methods

SMTP Connection and authentication

connect($host = null, $port = null, $user = null, $pass = null) : bool

Arguments

$host

$port

$user

$pass

Response

bool

Returns true on success, or false on error

Function for sending mail

send_mail($from, $recipients, &$headers, &$body, $opts = null) : bool

Arguments

$from

$recipients

$headers

$body

$opts

Response

bool

Returns true on success, or false on error

Reset the global SMTP connection

reset() 

Disconnect the global SMTP connection

disconnect() 

This is our own debug handler for the SMTP connection

debug_handler(&$smtp, $message) 

Arguments

$smtp

$message

Get error message

get_error() 

Get server response messages array

get_response() 

Take an array of mail headers and return a string containing text usable in sending a message.

_prepare_headers(array $headers) : mixed

Arguments

$headers

array

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'.

Response

mixed

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.

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.

_parse_rfc822($recipients) : array

Arguments

$recipients

Response

array

An array of forward paths (bare addresses).

Constants

SMTP_MIME_CRLF

SMTP_MIME_CRLF

DEBUG_LINE_LENGTH

DEBUG_LINE_LENGTH

Properties

conn

conn : 

response

response : 

error

error :