diff options
author | Vincent Richard <[email protected]> | 2005-04-09 19:46:40 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-04-09 19:46:40 +0000 |
commit | 18dacf00af4de081d2fbe4b0f0646a5e70f9099a (patch) | |
tree | 15ee7173da1f009d3ea317af0a36da9922b02d79 | |
parent | Fixed bug in Base64 decoding. (diff) | |
download | vmime-18dacf00af4de081d2fbe4b0f0646a5e70f9099a.tar.gz vmime-18dacf00af4de081d2fbe4b0f0646a5e70f9099a.zip |
Added attachMDNRequest().
-rw-r--r-- | src/mdn/MDNHelper.cpp | 17 | ||||
-rw-r--r-- | vmime/mdn/MDNHelper.hpp | 14 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/mdn/MDNHelper.cpp b/src/mdn/MDNHelper.cpp index 72dfeb93..324807e0 100644 --- a/src/mdn/MDNHelper.cpp +++ b/src/mdn/MDNHelper.cpp @@ -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; diff --git a/vmime/mdn/MDNHelper.hpp b/vmime/mdn/MDNHelper.hpp index 7eaf64e8..a1053cfd 100644 --- a/vmime/mdn/MDNHelper.hpp +++ b/vmime/mdn/MDNHelper.hpp @@ -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. * |