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.
This commit is contained in:
parent
bf395a8d87
commit
4b1ffebaa9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user