mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-26 03:36:23 +00:00
oc-mail: Fallback to PidTagSubject unicode when creating new mail
Some clients such as OpenChange client does not send the following properties PidTagNormalizedSubject or PidTagSubjectPrefix as suggested by [MS-OXCMAIL].
This commit is contained in:
@@ -771,6 +771,12 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
||||
subjectData = [mailProperties objectForKey: MAPIPropertyKey (PR_NORMALIZED_SUBJECT_UNICODE)];
|
||||
if (subjectData)
|
||||
[subject appendString: subjectData];
|
||||
if ([subject length] == 0)
|
||||
{
|
||||
subjectData = [mailProperties objectForKey: MAPIPropertyKey (PR_SUBJECT_UNICODE)];
|
||||
if (subjectData)
|
||||
[subject appendString: subjectData];
|
||||
}
|
||||
[headers setObject: [subject asQPSubjectString: @"utf-8"] forKey: @"subject"];
|
||||
|
||||
messageId = [mailProperties objectForKey: MAPIPropertyKey (PR_INTERNET_MESSAGE_ID_UNICODE)];
|
||||
|
||||
Reference in New Issue
Block a user