SMTP Connection and authentication
bool
connect
([string $host = null], [string $port = null], [string $user = null], [string $pass = null])
-
string
$host: Server host
-
string
$port: Server port
-
string
$user: User name
-
string
$pass: Password
This is our own debug handler for the SMTP connection
void
debug_handler
( &$smtp, $message)
Disconnect the global SMTP connection
void
disconnect
()
Get error message
void
get_error
()
Get server response messages array
void
get_response
()
Reset the global SMTP connection
void
reset
()
Function for sending mail
bool
send_mail
(string $from, mixed $recipients, mixed &$headers, mixed &$body, [array $opts = null])
-
string
$from: Sender e-Mail address
-
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.
-
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)