Improvements #9241 ยป patch_wt_multiple_replyto.patch
| src/Wt/Mail/Message.C | ||
|---|---|---|
|
value_ = value;
|
||
|
}
|
||
|
Mailbox Message::EMPTY_MAILBOX;
|
||
|
|
||
|
Message::Message()
|
||
|
{ }
|
||
| ... | ... | |
|
void Message::setReplyTo(const Mailbox& replyTo)
|
||
|
{
|
||
|
replyTo_ = replyTo;
|
||
|
replyTos_.clear();
|
||
|
addReplyTo(replyTo);
|
||
|
}
|
||
|
|
||
|
void Message::addReplyTo(const Mailbox &replyTo)
|
||
|
{
|
||
|
replyTos_.push_back(replyTo);
|
||
|
}
|
||
|
void Message::setSubject(const WString& subject)
|
||
| ... | ... | |
|
if (!date_.isNull())
|
||
|
out << "Date: " << date_.toString("ddd, dd MMM yyyy HH:mm:ss Z") << "\r\n";
|
||
|
if (!replyTo_.empty())
|
||
|
replyTo_.write("Reply-To", out);
|
||
|
for (const Mailbox& replyTo : replyTos_)
|
||
|
replyTo.write("Reply-To", out);
|
||
|
if (!subject_.empty()) {
|
||
|
out << "Subject: ";
|
||
| src/Wt/Mail/Message.h | ||
|---|---|---|
|
*/
|
||
|
void setReplyTo(const Mailbox& replyTo);
|
||
|
/*! \brief Returns the reply-to mailbox.
|
||
|
/*! \brief Adds a reply-to mailbox
|
||
|
*/
|
||
|
void addReplyTo(const Mailbox& replyTo);
|
||
|
|
||
|
/*! \brief Returns the first reply-to mailbox.
|
||
|
*
|
||
|
* \sa setReplyTo()
|
||
|
*/
|
||
|
const Mailbox& replyTo() const { return replyTo_; }
|
||
|
const Mailbox& replyTo() const { return replyTos_.empty() ? EMPTY_MAILBOX : replyTos_.front(); }
|
||
|
|
||
|
/*! \brief Returns all the reply-to mailboxes.
|
||
|
*
|
||
|
* \sa addReplyTo()
|
||
|
*/
|
||
|
const std::vector<Mailbox>& replyTos() const { return replyTos_; }
|
||
|
/*! \brief Sets a subject.
|
||
|
*/
|
||
| ... | ... | |
|
std::istream *data;
|
||
|
};
|
||
|
Mailbox from_, replyTo_;
|
||
|
Mailbox from_;
|
||
|
std::vector<Mailbox> replyTos_;
|
||
|
std::vector<Recipient> recipients_;
|
||
|
std::vector<Header> headers_;
|
||
|
std::vector<Attachment> attachments_;
|
||
| ... | ... | |
|
bool quoteIfNeeded);
|
||
|
static void encodeQuotedPrintable(const WString& text, std::ostream& out);
|
||
|
static Mailbox EMPTY_MAILBOX;
|
||
|
|
||
|
friend class Mailbox;
|
||
|
};
|
||