diff --git a/NEWS b/NEWS index 8e068c246..9af991d53 100644 --- a/NEWS +++ b/NEWS @@ -2,9 +2,10 @@ ------------------- Bug fixes - - sanity checks for events with bogus timezone offsets - - strip X- tags when securing content (#3695) - - when using EAS/ItemOperations, use IMAP PEEK operation + - [core] sanity checks for events with bogus timezone offsets + - [core] strip X- tags when securing content (#3695) + - [eas] when using EAS/ItemOperations, use IMAP PEEK operation + - [web] fixed recipients when replying from a message in the Sent mailbox (#2625) 2.3.11 (2016-05-12) ------------------- diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 87a86e8ac..5237fc98d 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -747,6 +747,7 @@ static NSString *userAgent = nil; // - (void) _fillInReplyAddresses: (NSMutableDictionary *) _info replyToAll: (BOOL) _replyToAll + fromSentMailbox: (BOOL) _fromSentMailbox envelope: (NGImap4Envelope *) _envelope { /* @@ -758,8 +759,6 @@ static NSString *userAgent = nil; Note: we cannot check reply-to, because Cyrus even sets a reply-to in the envelope if none is contained in the message itself! (bug or feature?) - - TODO: what about sender (RFC 822 3.6.2) */ NSMutableArray *to, *addrs, *allRecipients; NSArray *envelopeAddresses; @@ -801,7 +800,9 @@ static NSString *userAgent = nil; addrs = [NSMutableArray array]; envelopeAddresses = [_envelope replyTo]; - if ([envelopeAddresses count]) + if (_fromSentMailbox) + [addrs setArray: [_envelope to]]; + else if ([envelopeAddresses count]) [addrs setArray: envelopeAddresses]; else [addrs setArray: [_envelope from]]; @@ -973,17 +974,21 @@ static NSString *userAgent = nil; - (void) fetchMailForReplying: (SOGoMailObject *) sourceMail toAll: (BOOL) toAll { + BOOL fromSentMailbox; NSString *msgID; NSMutableDictionary *info; NGImap4Envelope *sourceEnvelope; + fromSentMailbox = [[sourceMail container] isKindOfClass: [SOGoSentFolder class]]; [sourceMail fetchCoreInfos]; info = [NSMutableDictionary dictionaryWithCapacity: 16]; [info setObject: [sourceMail subjectForReply] forKey: @"subject"]; sourceEnvelope = [sourceMail envelope]; - [self _fillInReplyAddresses: info replyToAll: toAll + [self _fillInReplyAddresses: info + replyToAll: toAll + fromSentMailbox: fromSentMailbox envelope: sourceEnvelope]; msgID = [sourceEnvelope messageID]; if ([msgID length] > 0)