Mail
[ class tree: Mail ] [ index: Mail ] [ all elements ]

Class: Mail

Source Location: /pear/Mail.php

Class Overview


PEAR's Mail:: interface. Defines the interface for implementing mailers under the PEAR hierarchy, and provides supporting functions useful in multiple mailer backends.


Author(s):

Version:

  • $Revision: 1.17 $

Variables

Methods


Child classes:

Mail_mail
internal PHP-mail() implementation of the PEAR Mail:: interface.
Mail_null
Null implementation of the PEAR Mail:: interface.
Mail_sendmail
Sendmail implementation of the PEAR Mail:: interface.
Mail_smtp
SMTP implementation of the PEAR Mail interface. Requires the Net_SMTP class.

Class Details

[line 32]
PEAR's Mail:: interface. Defines the interface for implementing mailers under the PEAR hierarchy, and provides supporting functions useful in multiple mailer backends.



Tags:

version:  $Revision: 1.17 $
access:  public


[ Top ]


Class Variables

$sep =  "\r\n"

[line 38]

Line terminator used for separating header lines.


Type:   string


[ Top ]



Class Methods


method factory [line 49]

object Mail &factory( string $driver, [array $params = array()])

Provides an interface for generating Mail:: objects of various types



Tags:

return:  a instance of the driver class or if fails a PEAR Error
access:  public


Parameters:

string   $driver   The kind of Mail:: object to instantiate.
array   $params   The parameters to pass to the Mail:: object.

[ Top ]

method send [line 88]

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

Implements Mail::send() function using php's built-in mail() command.



Tags:

return:  Returns true on success, or a PEAR_Error containing a descriptive error message on failure.
deprecated:  use Mail_mail::send instead
access:  public


Overridden in child classes as:

Mail_mail::send()
Implements Mail_mail::send() function using php's built-in mail() command.
Mail_null::send()
Implements Mail_null::send() function. Silently discards all mail.
Mail_sendmail::send()
Implements Mail::send() function using the sendmail command-line binary.
Mail_smtp::send()
Implements Mail::send() function using SMTP.

Parameters:

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.

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:53 +0100 by phpDocumentor 1.4.3