Skip to content

Commit

Permalink
fix(mail): fix SMTP authentication when reporting spam/ham
Browse files Browse the repository at this point in the history
Fixes #4941
  • Loading branch information
cgx committed Jan 17, 2020
1 parent d8fab6b commit 62f6431
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions SoObjects/Mailer/SOGoMailFolder.m
Expand Up @@ -884,21 +884,18 @@ - (WOResponse *) markMessagesAsJunkOrNotJunk: (NSArray *) uids
// 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];

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)
Expand Down

0 comments on commit 62f6431

Please sign in to comment.