|
|
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.
|
|
|
|
|
|
|
Private Field Summary |
string |
$hostThe SMTP host to connect to. |
integer |
$portThe port the SMTP server is on. |
boolean |
$authWhether or not to attempt to authenticate to the SMTP server. |
string |
$usernameThe username to use if the SMTP server requires authentication. |
string |
$passwordThe 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.
|
|
|
|
|
PHPDoc 1.0beta |