Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/cch/www/pear/Mail/smtp.php
PEAR Repository -

Mail_smtp

PEAR
   |
  +-- Mail
     |
    +-- Mail_smtp

SMTP implementation of the PEAR Mail:: interface. Requires the PEAR
Net_SMTP:: class.

 

private class Mail_smtp extends Mail

SMTP implementation of the PEAR Mail:: interface. Requires the PEAR
Net_SMTP:: class.

AuthorsStig Bakken <ssb@fast.no>
SincePHP 4.0.2

 

Methods inherited from Mail

factory, prepareheaders, parserecipients

Methods inherited from PEAR

pear, _pear, iserror, pear_error, getmode, getcallback, getmessage, getcode, gettype, getdebuginfo, tostring, _pear_call_destructors

Public Method Summary

void

Mail_smtp(array $params)

Constructor.
mixed

send(mixed $recipients, array $headers, string $body)

Implements Mail::send() function using SMTP.

Fields inherited from PEAR

$_debug, $error_message_prefix, $error_prepend, $error_append, $mode, $level, $code, $message, $debuginfo, $file, $line

Private Field Summary

string

$host

The SMTP host to connect to.
integer

$port

The port the SMTP server is on.
boolean

$auth

Whether or not to attempt to authenticate to the SMTP server.
string

$username

The username to use if the SMTP server requires authentication.
string

$password

The password to use if the SMTP server requires authentication.

Public Method Details

Mail_smtp

public void Mail_smtp( array $params )

  Constructor.

Instantiates a new Mail_smtp:: object based on the parameters
passed in. It looks for the following parameters:
host The server to connect to. Defaults to localhost.
port The port to connect to. Defaults to 25.
auth Whether or not to use SMTP auth. Defaults to false.
username The username to use for SMTP auth. No default.
password The password to use for SMTP auth. No default.

If a parameter is present in the $params array, it replaces the
default.

Parameter
array $params
Hash containing any parameters different from the
defaults.
Returns void


send

public mixed send( mixed $recipients, array $headers, string $body )

  Implements Mail::send() function using SMTP.

Parameter
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.
Returns mixed

Returns true on success, or a PEAR_Error
containing a descriptive error message on
failure.


Private Field Details

$host

private string $host

>>'localhost'<<


$port

private integer $port

>>25<<


$auth

private boolean $auth

>>false<<


$username

private string $username

>>''<<


$password

private string $password

>>''<<



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta