aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortholdawa <[email protected]>2014-01-22 19:26:57 +0000
committertholdawa <[email protected]>2014-01-22 19:26:57 +0000
commit4b1ffebaa929007c70b83abecc45108006f14aea (patch)
tree9b89216670b49c7e91ddcf83e923a0e67d63ee5e
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadvmime-4b1ffebaa929007c70b83abecc45108006f14aea.tar.gz
vmime-4b1ffebaa929007c70b83abecc45108006f14aea.zip
IMAPMessage::processFetchResponse was attempting to set Cc and Bcc header fields to values of type mailboxList.
HeaderFieldFactory registers these fields as type adddressList, so a bad_field_value_type exception was thrown when processing a fetch response for a message with either Cc or Bcc fields. Fixed by calling toAddressList on the mailboxList header field values to convert them to expected type.
-rw-r--r--src/vmime/net/imap/IMAPMessage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vmime/net/imap/IMAPMessage.cpp b/src/vmime/net/imap/IMAPMessage.cpp
index c11aafc2..226a55fe 100644
--- a/src/vmime/net/imap/IMAPMessage.cpp
+++ b/src/vmime/net/imap/IMAPMessage.cpp
@@ -460,14 +460,14 @@ int IMAPMessage::processFetchResponse
IMAPUtils::convertAddressList(*(env->env_cc()), cc);
if (!cc.isEmpty())
- hdr->Cc()->setValue(cc);
+ hdr->Cc()->setValue(cc.toAddressList());
// Bcc
mailboxList bcc;
IMAPUtils::convertAddressList(*(env->env_bcc()), bcc);
if (!bcc.isEmpty())
- hdr->Bcc()->setValue(bcc);
+ hdr->Bcc()->setValue(bcc.toAddressList());
}
break;