diff options
author | Vincent Richard <[email protected]> | 2011-06-19 18:39:35 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2011-06-19 18:39:35 +0000 |
commit | fbdb750496dac75e8f4211b3a1b4d800858acf3b (patch) | |
tree | 5601db7785d67e3ad1df1a1d67dfbf187a316283 | |
parent | Alias for UTF-7 charset. (diff) | |
download | vmime-fbdb750496dac75e8f4211b3a1b4d800858acf3b.tar.gz vmime-fbdb750496dac75e8f4211b3a1b4d800858acf3b.zip |
Fixed messageBuilder to accept an empty mailbox group in 'To:' field, to allow for undisclosed-recipients (Zarafa).
-rw-r--r-- | src/messageBuilder.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/messageBuilder.cpp b/src/messageBuilder.cpp index 870d59e7..3597b3ae 100644 --- a/src/messageBuilder.cpp +++ b/src/messageBuilder.cpp @@ -51,17 +51,15 @@ ref <message> messageBuilder::construct() const // Generate the header fields msg->getHeader()->Subject()->setValue(m_subject); - if (m_from.isEmpty()) - throw exceptions::no_expeditor(); - - if ((m_to.isEmpty() || m_to.getAddressAt(0)->isEmpty()) && + if (((m_to.isEmpty()) || (m_to.getAddressAt(0)->isEmpty() && !m_to.getAddressAt(0)->isGroup())) && (m_cc.isEmpty() || m_cc.getAddressAt(0)->isEmpty()) && (m_bcc.isEmpty() || m_bcc.getAddressAt(0)->isEmpty())) { throw exceptions::no_recipient(); } - msg->getHeader()->From()->setValue(m_from); + if (!m_from.isEmpty()) + msg->getHeader()->From()->setValue(m_from); if (!m_to.isEmpty()) msg->getHeader()->To()->setValue(m_to); |