MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

[Bug] - Android failed to authenticate smtp login, but iOS is ok #1980

Open newbieyhj opened 1 year ago

newbieyhj commented 1 year ago

Summary smtp authentication fails.

Platform(s) Android

Happens on Mail Server smtp calls mailesmtp_auth_sasl(mSmtp, "LOGIN",...) Failed, error 17 is returned, however iOS is OK.

Piece of code

In the login() method of  MCSMTPSession.cpp:
r = mailesmtp_auth_sasl(mSmtp, "LOGIN",
                                    MCUTF8(mHostname),
                                    NULL,
                                    NULL,
                                    MCUTF8(mUsername), MCUTF8(mUsername),
                                    MCUTF8(mPassword), NULL);

Actual outcome r return errorcode is 17.

Connection Logs

Expected outcome r return 0.

Link to sample code on GitHub reproducing the issue (a full Xcode project):

https://