0

I am using Erlang and its esmtp library to send emails from my application. It used to work OK and still works fine on the development machine. Unfortunately several weeks ago it stopped working on the production server. I get the following messages in the log:

2016-02-08 00:19:40.281 [debug] <0.676.0>@esmtp_sock:connect:33 SMTP: connect to "smtp.googlemail.com":465, ssl
2016-02-08 00:19:40.393 [debug] <0.676.0>@esmtp_sock:connect:36 SMTP: connected on socket {sslsocket,{gen_tcp,#Port<0.11477>,tls_connection,undefined},<0.678.0>}
2016-02-08 00:19:40.434 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"220 smtp.googlemail.com ESMTP yz5sm27006239wjc.36 - gsmtp\r\n">>
2016-02-08 00:19:40.434 [debug] <0.676.0>@esmtp_sock:send:72 SMTP: send [[<<"EHLO ">>,"relay.example.com"],13,10]
2016-02-08 00:19:40.455 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250-smtp.googlemail.com at your service, [<SERVER-IP-ADDRESS>]\r\n">>
2016-02-08 00:19:40.455 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250-SIZE 35882577\r\n">>
2016-02-08 00:19:40.455 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250-8BITMIME\r\n">>
2016-02-08 00:19:40.455 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\r\n">>
2016-02-08 00:19:40.455 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250-ENHANCEDSTATUSCODES\r\n">>
2016-02-08 00:19:40.456 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250-PIPELINING\r\n">>
2016-02-08 00:19:40.456 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250-CHUNKING\r\n">>
2016-02-08 00:19:40.456 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"250 SMTPUTF8\r\n">>
2016-02-08 00:19:40.456 [debug] <0.676.0>@esmtp_sock:send:72 SMTP: send [[<<"AUTH ">>,"PLAIN"],13,10]
2016-02-08 00:19:40.474 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"334 \r\n">>
2016-02-08 00:19:40.474 [debug] <0.676.0>@esmtp_sock:send:72 SMTP: send [[<<"BASE64-ENCODED-CREDENTIALS">>],13,10]
2016-02-08 00:19:40.613 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"535-5.7.8 Username and Password not accepted. Learn more at\r\n">>
2016-02-08 00:19:40.613 [debug] <0.676.0>@esmtp_sock:read_response:46 SMTP: response line: <<"535 5.7.8  https://support.google.com/mail/answer/14257 yz5sm27006239wjc.36 - gsmtp\r\n">>

The log from the dev machine is completely the same. The encoded credential string as well! I've set "Allow less secure apps" to On for the email account. Please, help! Thank you.

Jenny D
  • 27,358
  • 21
  • 74
  • 110

0 Answers0