Horde_Mime_Mdn
in package
Message Disposition Notifications (RFC 3798).
Tags
Table of Contents
- MDN_HEADER = 'Disposition-Notification-To'
- $_headers : Horde_Mime_Headers
- The Horde_Mime_Headers object.
- $_msgtext : string
- The text of the original message.
- __construct() : mixed
- Constructor.
- addMdnRequestHeaders() : mixed
- Add a MDN (read receipt) request header.
- generate() : mixed
- Generate the MDN according to the specifications listed in RFC 3798 [3].
- getMdnReturnAddr() : string
- Returns the address(es) to return the MDN to.
- originalMessageText() : mixed
- When generating the MDN, should we return the enitre text of the original message? The default is no - we only return the headers of the original message. If the text is passed in via this method, we will return the entire message.
- userConfirmationNeeded() : bool
- Is user input required to send the MDN? Explicit confirmation is needed in some cases to prevent mail loops and the use of MDNs for mail bombing.
Constants
MDN_HEADER
public
mixed
MDN_HEADER
= 'Disposition-Notification-To'
Properties
$_headers
The Horde_Mime_Headers object.
protected
Horde_Mime_Headers
$_headers
$_msgtext
The text of the original message.
protected
string
$_msgtext
= \false
Methods
__construct()
Constructor.
public
__construct(Horde_Mime_Headers $headers) : mixed
Parameters
- $headers : Horde_Mime_Headers
Return values
mixed —addMdnRequestHeaders()
Add a MDN (read receipt) request header.
public
addMdnRequestHeaders(mixed $to) : mixed
Parameters
- $to : mixed
-
The address(es) the receipt should be mailed to.
Return values
mixed —generate()
Generate the MDN according to the specifications listed in RFC 3798 [3].
public
generate(bool $action, bool $sending, string $type, string $name, Horde_Mail_Transport $mailer[, array<string|int, mixed> $opts = array() ][, array<string|int, mixed> $mod = array() ][, array<string|int, mixed> $err = array() ]) : mixed
Parameters
- $action : bool
-
Was this MDN type a result of a manual action on part of the user?
- $sending : bool
-
Was this MDN sent as a result of a manual action on part of the user?
- $type : string
-
The type of action performed by the user. Per RFC 3798 [3.2.6.2] the following types are valid:
- deleted
- displayed
- $name : string
-
The name of the local server.
- $mailer : Horde_Mail_Transport
-
Mail transport object.
- $opts : array<string|int, mixed> = array()
-
Additional options:
- charset: (string) Default charset. DEFAULT: NONE
- from_addr: (string) From address. DEFAULT: NONE
- $mod : array<string|int, mixed> = array()
-
The list of modifications. Per RFC 3798 [3.2.6.3] the following modifications are valid:
- error
- $err : array<string|int, mixed> = array()
-
If $mod is 'error', the additional information to provide. Key is the type of modification, value is the text.
Return values
mixed —getMdnReturnAddr()
Returns the address(es) to return the MDN to.
public
getMdnReturnAddr() : string
Return values
string —The address(es) to send the MDN to. Returns null if no MDN is requested.
originalMessageText()
When generating the MDN, should we return the enitre text of the original message? The default is no - we only return the headers of the original message. If the text is passed in via this method, we will return the entire message.
public
originalMessageText(string $text) : mixed
Parameters
- $text : string
-
The text of the original message.
Return values
mixed —userConfirmationNeeded()
Is user input required to send the MDN? Explicit confirmation is needed in some cases to prevent mail loops and the use of MDNs for mail bombing.
public
userConfirmationNeeded() : bool
Return values
bool —Is explicit user input required to send the MDN?