Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/www/apache/doc2//pear/Mail/smtp.php
PEAR 2000/12/03 -

Mail_smtp

PEAR
   |
  +-- Mail
     |
    +-- Mail_smtp

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

 

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_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.Warning: documentation is missing.

Fields inherited from PEAR

$_debug

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 parameterspassed 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 thedefault.

Parameter
array $params
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.

Warning: documentation is missing.

Parameter
mixed $recipients
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
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
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'<<

The SMTP host to connect to.


$port

private integer $port

>>25<<

The port the SMTP server is on.


$auth

private boolean $auth

>>false<<

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


$username

private string $username

>>''<<

The username to use if the SMTP server requires authentication.


$password

private string $password

>>''<<

The password to use if the SMTP server requires authentication.



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta