Overview

Packages

  • Mail

Classes

  • Horde_Mail
  • Horde_Mail_Exception
  • Horde_Mail_Rfc822
  • Horde_Mail_Rfc822_Address
  • Horde_Mail_Rfc822_Group
  • Horde_Mail_Rfc822_Object
  • Horde_Mail_Transport
  • Horde_Mail_Transport_Mail
  • Horde_Mail_Transport_Mock
  • Horde_Mail_Transport_Null
  • Horde_Mail_Transport_Sendmail
  • Horde_Mail_Transport_Smtp
  • Horde_Mail_Transport_Smtpmx
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Mail_Transport

Mail transport base class.

Direct known subclasses

Horde_Mail_Transport_Mail, Horde_Mail_Transport_Mock, Horde_Mail_Transport_Null, Horde_Mail_Transport_Sendmail, Horde_Mail_Transport_Smtp, Horde_Mail_Transport_Smtpmx
Abstract
Package: Mail
Version: $Revision: 294747 $
Located at Horde/Mail/Transport.php
Methods summary
abstract public
# send( mixed $recipients, array $headers, mixed $body )

Send a message.

Send a message.

Parameters

$recipients
<p>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.</p>
$headers
<p>The 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'. If the '_raw' key exists, the value of this key will be used as the exact text for sending the message.</p>
$body
<p>The full text of the message body, including any Mime parts, etc. Either a string or a stream resource.</p>

Throws

Horde_Mail_Exception
public mixed
# prepareHeaders( array $headers )

Take an array of mail headers and return a string containing text usable in sending a message.

Take an array of mail headers and return a string containing text usable in sending a message.

Parameters

$headers
<p>The array of headers to prepare, 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'. If the '_raw' key exists, the value of this key will be used as the exact text for sending the message.</p>

Returns

mixed

Returns false if it encounters a bad address; otherwise returns an array containing two elements: Any From: address found in the headers, and the plain text version of the headers.

Throws

Horde_Mail_Exception
public array
# parseRecipients( mixed $recipients )

Take a set of recipients and parse them, returning an array of bare addresses (forward paths) that can be passed to sendmail or an SMTP server with the 'RCPT TO:' command.

Take a set of recipients and parse them, returning an array of bare addresses (forward paths) that can be passed to sendmail or an SMTP server with the 'RCPT TO:' command.

Parameters

$recipients
<p>a comma-separated list of recipients (RFC822 compliant), or an array of recipients, each RFC822 valid.</p>

Returns

array
Forward paths (bare addresses).

Throws

Horde_Mail_Exception
Properties summary
public string $sep

Line terminator used for separating header lines.

Line terminator used for separating header lines.

# PHP_EOL
API documentation generated by ApiGen