Skip to content

Commit

Permalink
Fixes an issue where sending email to servers that don't require auth…
Browse files Browse the repository at this point in the history
…entication would fail. Closes #425
  • Loading branch information
eahrold committed Aug 12, 2015
1 parent 4a823c6 commit aaebb72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ + (BOOL)isEnabled

+ (BOOL)storesInfoInKeychain
{
return YES;
return [[LGDefaults standardUserDefaults] SMTPAuthenticationEnabled];
}

+ (NSString *)account
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ - (void)savePassword:(void (^)(NSError *error))reply
NSString *account = _smtpUsername.safe_stringValue;
NSString *password = _smtpPassword.safe_stringValue;

if (account) {
if (account && [LGEmailNotification storesInfoInKeychain]) {
[LGEmailNotification saveInfoToKeychain:password reply:^(NSError *error) {
if (reply) {
reply(error);
Expand All @@ -206,6 +206,10 @@ - (void)savePassword:(void (^)(NSError *error))reply
}
}
}];
} else {
if(reply){
reply(nil);
}
}
}

Expand Down

0 comments on commit aaebb72

Please sign in to comment.