{"action":"created","issue":{"url":"https://api.github.com/repos/MailCore/mailcore2/issues/1380","repository_url":"https://api.github.com/repos/MailCore/mailcore2","labels_url":"https://api.github.com/repos/MailCore/mailcore2/issues/1380/labels{/name}","comments_url":"https://api.github.com/repos/MailCore/mailcore2/issues/1380/comments","events_url":"https://api.github.com/repos/MailCore/mailcore2/issues/1380/events","html_url":"https://github.com/MailCore/mailcore2/issues/1380","id":140942263,"number":1380,"title":"2:18.802 EveryPod[45737:1084569] Error sending email: Error Domain=MCOErrorDomain Code=5 \"Unable to authenticate with the current session's credentials.","user":{"login":"Zaheer6110","id":17849493,"avatar_url":"https://avatars.githubusercontent.com/u/17849493?v=3","gravatar_id":"","url":"https://api.github.com/users/Zaheer6110","html_url":"https://github.com/Zaheer6110","followers_url":"https://api.github.com/users/Zaheer6110/followers","following_url":"https://api.github.com/users/Zaheer6110/following{/other_user}","gists_url":"https://api.github.com/users/Zaheer6110/gists{/gist_id}","starred_url":"https://api.github.com/users/Zaheer6110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zaheer6110/subscriptions","organizations_url":"https://api.github.com/users/Zaheer6110/orgs","repos_url":"https://api.github.com/users/Zaheer6110/repos","events_url":"https://api.github.com/users/Zaheer6110/events{/privacy}","received_events_url":"https://api.github.com/users/Zaheer6110/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-15T11:20:25Z","updated_at":"2016-03-16T06:26:07Z","closed_at":null,"body":"Connection Logger says..\r\nResponse shows Username and Password not accepted. Learn more at\r\n535 5.7.8  https://support.google.com/mail/answer/14257\r\ntried everything changed ports run on different devices but still getting same issue..\r\nI dont know why this error is occurring and why it saying about username and password because im using outh2 where password is not even required.. i also tried using password=nil as well. without outh2 it works but with access token its not working.. When i cahnage authentication type to MCOAuthTypeSASLPlain and gave username and password its working well but not without them.. please Help me im struggling from last 3,4 days\r\n  \r\n    MCOSMTPSession * smtpSession = [[MCOSMTPSession alloc] init];\r\n    smtpSession.hostname = @\"smtp.gmail.com\";\r\n    smtpSession.port = 465;\r\nsmtpSession.username = user; //saved value\r\nsmtpSession.connectionType = MCOConnectionTypeTLS;\r\nsmtpSession.OAuth2Token = token; //saved value(Validated)\r\n   smtpSession.authType = MCOAuthTypeXOAuth2;\r\n   smtpSession.checkCertificateEnabled=NO;\r\n\r\n    \r\n    \r\n    MCOMessageBuilder * builder = [[MCOMessageBuilder alloc] init];\r\n    MCOAddress *fromAdress=[[MCOAddress alloc]init];\r\n    fromAdress = [MCOAddress addressWithMailbox:user];\r\n    MCOAddress *toAdress=[[MCOAddress alloc]init];\r\n    toAdress = [MCOAddress addressWithMailbox:self.to.text];\r\n    [[builder header] setFrom:fromAdress];\r\n    [[builder header] setTo:@[toAdress]];\r\n    NSString *htmlbody1=@\"Body\";\r\n [[builder header] setSubject:@\"Some_subject\"];\r\n    [builder setHTMLBody:htmlbody1];\r\n     [smtpSession setConnectionLogger:^(void * connectionID, MCOConnectionLogType type, NSData * data) {\r\n        NSString *response = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];\r\n        NSLog(@\"Response %@\",response);\r\n    }];\r\n    NSData * rfc822Data = [builder data];\r\n    \r\n    MCOSMTPSendOperation *sendOperation = [smtpSession sendOperationWithData:rfc822Data];\r\n    [sendOperation start:^(NSError *error) {\r\n        if(error) {\r\n      \r\n            NSLog(@\"Error sending email: %@\", error);\r\n        } else {\r\n           \r\n        }\r\n    }];\r\n"},"comment":{"url":"https://api.github.com/repos/MailCore/mailcore2/issues/comments/197170537","html_url":"https://github.com/MailCore/mailcore2/issues/1380#issuecomment-197170537","issue_url":"https://api.github.com/repos/MailCore/mailcore2/issues/1380","id":197170537,"user":{"login":"Zaheer6110","id":17849493,"avatar_url":"https://avatars.githubusercontent.com/u/17849493?v=3","gravatar_id":"","url":"https://api.github.com/users/Zaheer6110","html_url":"https://github.com/Zaheer6110","followers_url":"https://api.github.com/users/Zaheer6110/followers","following_url":"https://api.github.com/users/Zaheer6110/following{/other_user}","gists_url":"https://api.github.com/users/Zaheer6110/gists{/gist_id}","starred_url":"https://api.github.com/users/Zaheer6110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zaheer6110/subscriptions","organizations_url":"https://api.github.com/users/Zaheer6110/orgs","repos_url":"https://api.github.com/users/Zaheer6110/repos","events_url":"https://api.github.com/users/Zaheer6110/events{/privacy}","received_events_url":"https://api.github.com/users/Zaheer6110/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T06:26:07Z","updated_at":"2016-03-16T06:26:07Z","body":"I dont know where im sending empty response.."}}