Use matching recipient address when replying

Fixes #4495
This commit is contained in:
Francis Lachapelle
2018-07-09 15:49:36 -04:00
parent d6f85efa8a
commit 120f1280a4
3 changed files with 37 additions and 3 deletions
+7
View File
@@ -931,6 +931,7 @@ static NSString *userAgent = nil;
{
BOOL fromSentMailbox;
NSString *msgID;
NSMutableArray *addresses;
NSMutableDictionary *info;
NGImap4Envelope *sourceEnvelope;
@@ -948,6 +949,12 @@ static NSString *userAgent = nil;
msgID = [sourceEnvelope messageID];
if ([msgID length] > 0)
[self setInReplyTo: msgID];
addresses = [NSMutableArray array];
[self _addEMailsOfAddresses: [sourceEnvelope to] toArray: addresses];
if ([addresses count])
[info setObject: [addresses objectAtIndex: 0] forKey: @"from"];
[self setText: [sourceMail contentForReply]];
[self setHeaders: info];
[self setSourceURL: [sourceMail imap4URLString]];