feat(mail): handle multiple mail identities

Fixes #5117
pull/273/head
Francis Lachapelle 2020-08-03 22:48:45 -04:00
parent d26bc181fd
commit d930821d6b
2 changed files with 3 additions and 3 deletions

View File

@ -700,9 +700,9 @@ static NSString *userAgent = nil;
[self _addRecipients: [_envelope bcc] toArray: addrs];
}
identity = nil;
if ([addrs count])
{
identity = nil;
for (i = 0; !identity && i < [addrs count]; i++)
{
email = [addrs objectAtIndex: i];
@ -713,7 +713,7 @@ static NSString *userAgent = nil;
[_info setObject: [self _emailFromIdentity: identity] forKey: @"from"];
}
}
else
if (!identity)
{
identity = [[context activeUser] defaultIdentity];
if (identity)

View File

@ -348,7 +348,7 @@
NSString *defaultEmail;
unsigned int count, max;
defaultEmail = [NSString stringWithFormat: @"%@@%@", [self loginInDomain], [self domain]];
defaultEmail = [self systemEmail];
defaultAccount = [[self mailAccounts] objectAtIndex: 0];
defaultIdentity = nil;