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

Class: Mail

Source Location: /Mail-1.2.0/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: 294747 $

Variables

Methods


Child classes:

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

Inherited Variables

Inherited Methods


Class Details

[line 57]
PEAR's Mail:: interface. Defines the interface for implementing mailers under the PEAR hierarchy, and provides supporting functions useful in multiple mailer backends.
  • Version: $Revision: 294747 $
  • Access: public


[ Top ]


Class Variables

$sep =  "\r\n"

[line 63]

Line terminator used for separating header lines.

Type:   string


[ Top ]



Method Detail

factory   [line 74]

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

Provides an interface for generating Mail:: objects of various types
  • 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 ]

send   [line 114]

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

Implements Mail::send() function using php's built-in mail() command.
  • 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_sendmail::send()
Implements Mail::send() function using the sendmail command-line binary.
Mail_mock::send()
Implements Mail_mock::send() function. Silently discards all mail.
Mail_null::send()
Implements Mail_null::send() function. Silently discards all mail.
Mail_mail::send()
Implements Mail_mail::send() function using php's built-in mail() command.
Mail_smtp::send()
Implements Mail::send() function using SMTP.
Mail_smtpmx::send()
Implements Mail::send() function using SMTP direct delivery

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 Mon, 11 Mar 2019 15:36:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.