mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 04:48:52 +00:00
oc-mail: Set sender on email messages without an orig recipient
But it has recipients. This is for sure happening with event invitations messages.
This commit is contained in:
1
NEWS
1
NEWS
@@ -7,6 +7,7 @@ Enhancements
|
||||
- Appointment color and importance work now between Outlooks
|
||||
|
||||
Bug fixes
|
||||
- Fix sender on importing email messages like event invitations
|
||||
- Fix Outlook crashes when modifying the view of a folder
|
||||
- Fix server side crash when reading some recurrence appointments
|
||||
|
||||
|
||||
@@ -536,6 +536,7 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
||||
NSDictionary *mailProperties, BOOL withBcc,
|
||||
struct mapistore_connection_info *connInfo)
|
||||
{
|
||||
BOOL fromResolved = NO;
|
||||
NSData *senderEntryId;
|
||||
NSMutableString *subject;
|
||||
NSString *from, *recId, *messageId, *subjectData, *recipientsStr;
|
||||
@@ -572,13 +573,15 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
||||
|
||||
list = MakeRecipientsList ([recipients objectForKey: @"orig"]);
|
||||
if ([list count])
|
||||
[headers setObjects: list forKey: @"from"];
|
||||
{
|
||||
[headers setObjects: list forKey: @"from"];
|
||||
fromResolved = YES;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!fromResolved)
|
||||
{
|
||||
NSLog (@"Message without recipients."
|
||||
@"Guessing recipients from PidTagSenderEntryId, PidTagOriginalDisplayTo"
|
||||
@"and PidTagOriginalCc");
|
||||
NSLog (@"Message without an orig from, try to guess it from PidTagSenderEntryId");
|
||||
senderEntryId = [mailProperties objectForKey: MAPIPropertyKey (PR_SENDER_ENTRYID)];
|
||||
if (senderEntryId)
|
||||
{
|
||||
@@ -638,7 +641,12 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!recipients)
|
||||
{
|
||||
NSLog (@"Message without recipients."
|
||||
@"Guessing recipients from PidTagOriginalDisplayTo and PidTagOriginalCc");
|
||||
recipientsStr = [mailProperties objectForKey: MAPIPropertyKey (PidTagOriginalDisplayTo)];
|
||||
if (recipientsStr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user