Added attachMDNRequest().

This commit is contained in:
Vincent Richard 2005-04-09 19:46:40 +00:00
parent 3952df7eaa
commit 18dacf00af
2 changed files with 31 additions and 0 deletions

View File

@ -27,6 +27,23 @@ namespace vmime {
namespace mdn {
void MDNHelper::attachMDNRequest(message* msg, const mailboxList& mailboxes)
{
header* hdr = msg->getHeader();
hdr->DispositionNotificationTo().setValue(mailboxes);
}
void MDNHelper::attachMDNRequest(message* msg, const mailbox& mbox)
{
mailboxList mboxList;
mboxList.appendMailbox(mbox.clone());
attachMDNRequest(msg, mboxList);
}
const std::vector <sendableMDNInfos> MDNHelper::getPossibleMDNs(const message* msg)
{
std::vector <sendableMDNInfos> result;

View File

@ -37,6 +37,20 @@ class MDNHelper
{
public:
/** Attach a MDN request to the specified message.
*
* @param msg message in which to add a MDN request
* @param mailboxes list of mailboxes to which the MDN will be sent
*/
static void attachMDNRequest(message* msg, const mailboxList& mailboxes);
/** Attach a MDN request to the specified message.
*
* @param msg message in which to add a MDN request
* @param mbox mailbox to which the MDN will be sent
*/
static void attachMDNRequest(message* msg, const mailbox& mbox);
/** Return a list of possible MDNs that can be generated
* for the specified message.
*