MDNHelper Class Reference

Helper for creating or extracting Message Disposition Notifications (MDN), as defined in RFC-3798. More...

List of all members.

Static Public Member Functions

static void attachMDNRequest (ref< message > msg, const mailboxList &mailboxes)
static void attachMDNRequest (ref< message > msg, const mailbox &mbox)
static const std::vector
< sendableMDNInfos
getPossibleMDNs (const ref< const message > msg)
static bool isMDN (const ref< const message > msg)
static receivedMDNInfos getReceivedMDN (const ref< const message > msg)
static bool needConfirmation (const ref< const message > msg)
static ref< messagebuildMDN (const sendableMDNInfos &mdnInfos, const string &text, const charset &ch, const mailbox &expeditor, const disposition &dispo, const string &reportingUA=NULL_STRING, const std::vector< string > &reportingUAProducts=std::vector< string >())

Detailed Description

Helper for creating or extracting Message Disposition Notifications (MDN), as defined in RFC-3798.


Member Function Documentation

void attachMDNRequest ( ref< message msg,
const mailbox mbox 
) [static]

Attach a MDN request to the specified message.

Parameters:
msg message in which to add a MDN request
mbox mailbox to which the MDN will be sent

References MDNHelper::attachMDNRequest().

void attachMDNRequest ( ref< message msg,
const mailboxList mailboxes 
) [static]

Attach a MDN request to the specified message.

Parameters:
msg message in which to add a MDN request
mailboxes list of mailboxes to which the MDN will be sent

Referenced by MDNHelper::attachMDNRequest(), and MDNHelper::getPossibleMDNs().

ref< message > buildMDN ( const sendableMDNInfos mdnInfos,
const string text,
const charset ch,
const mailbox expeditor,
const disposition dispo,
const string reportingUA = NULL_STRING,
const std::vector< string > &  reportingUAProducts = std::vector <string>() 
) [static]

Build a new MDN for the message.

The resulting MDN can then be sent over SMTP transport service.

Parameters:
mdnInfos information about the MDN to construct
text human readable message. The purpose of this message is to provide an easily-understood description of the condition(s) that caused the report to be generated.
ch charset of the text
expeditor expeditor of the MDN
dispo disposition information
reportingUA name of reporting user-agent (optional)
reportingUAProducts list of products in the reporting user-agent (optional)
Returns:
a new message object containing the MDN
const std::vector< sendableMDNInfos > getPossibleMDNs ( const ref< const message msg  )  [static]

Return a list of possible MDNs that can be generated for the specified message.

Parameters:
msg message for which to send a MDN
Returns:
list of possible MDNs

References mailboxList::appendMailbox(), MDNHelper::attachMDNRequest(), and mailbox::clone().

receivedMDNInfos getReceivedMDN ( const ref< const message msg  )  [static]

If the specified message is a MDN, return information about it.

Parameters:
msg message
Exceptions:
exceptions::invalid_argument if the message is not a MDN
Returns:
information about the MDN
bool isMDN ( const ref< const message msg  )  [static]

Test whether the specified message is a MDN.

Parameters:
msg message
Returns:
true if the message is a MDN, false otherwise

Referenced by MDNHelper::needConfirmation().

bool needConfirmation ( const ref< const message msg  )  [static]

Check whether we need user confirmation for sending a MDN even if he/she explicitely allowed automatic send of MDNs.

This can happen in some situations, described in RFC-3798.

Parameters:
msg message for which to send a MDN
Returns:
true if user confirmation should be asked, false otherwise

References MDNHelper::isMDN().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2