fix(mail): fix SMTP authentication when reporting spam/ham

Fixes #4941
This commit is contained in:
Francis Lachapelle
2020-01-17 09:53:16 -05:00
parent d8fab6bb21
commit 62f64314c0

View File

@@ -884,7 +884,6 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
// We reached the limit or the end of the array
if ((i%limit) == 0 || i == [uids count]-1)
{
id <SOGoAuthenticator> authenticator;
NGMimeMessageGenerator *generator;
[messageToSend setBody: body];
@@ -892,13 +891,11 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
generator = [[[NGMimeMessageGenerator alloc] init] autorelease];
data = [generator generateMimeFromPart: messageToSend];
authenticator = [SOGoDAVAuthenticator sharedSOGoDAVAuthenticator];
error = [[SOGoMailer mailerWithDomainDefaults: [[context activeUser] domainDefaults]]
sendMailData: data
toRecipients: [NSArray arrayWithObject: recipient]
sender: [[identities objectAtIndex: 0] objectForKey: @"email"]
withAuthenticator: authenticator
withAuthenticator: [self authenticatorInContext: context]
inContext: context];
if (error)