Fixed messageBuilder to accept an empty mailbox group in 'To:' field, to allow for undisclosed-recipients (Zarafa).
This commit is contained in:
parent
4286a80d9d
commit
fbdb750496
@ -51,16 +51,14 @@ ref <message> messageBuilder::construct() const
|
|||||||
// Generate the header fields
|
// Generate the header fields
|
||||||
msg->getHeader()->Subject()->setValue(m_subject);
|
msg->getHeader()->Subject()->setValue(m_subject);
|
||||||
|
|
||||||
if (m_from.isEmpty())
|
if (((m_to.isEmpty()) || (m_to.getAddressAt(0)->isEmpty() && !m_to.getAddressAt(0)->isGroup())) &&
|
||||||
throw exceptions::no_expeditor();
|
|
||||||
|
|
||||||
if ((m_to.isEmpty() || m_to.getAddressAt(0)->isEmpty()) &&
|
|
||||||
(m_cc.isEmpty() || m_cc.getAddressAt(0)->isEmpty()) &&
|
(m_cc.isEmpty() || m_cc.getAddressAt(0)->isEmpty()) &&
|
||||||
(m_bcc.isEmpty() || m_bcc.getAddressAt(0)->isEmpty()))
|
(m_bcc.isEmpty() || m_bcc.getAddressAt(0)->isEmpty()))
|
||||||
{
|
{
|
||||||
throw exceptions::no_recipient();
|
throw exceptions::no_recipient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_from.isEmpty())
|
||||||
msg->getHeader()->From()->setValue(m_from);
|
msg->getHeader()->From()->setValue(m_from);
|
||||||
|
|
||||||
if (!m_to.isEmpty())
|
if (!m_to.isEmpty())
|
||||||
|
Loading…
Reference in New Issue
Block a user