Send email via SMTP via Yandex SMTP server smtp.yandex.ru
Email should be sent successfully.
Error appears:
SMTP ERROR: Password command failed: 535 5.7.8 Error: authentication failed: Invalid format.
Joomla! 3.9.23 Stable [ Amani ] 24-November-2020
Debian 10, PHP 7.3-FPM, Apache
Mail settings in Joomla:
Problem appeared on all of my websites after Joomla update. I don't know exactly what Joomla update caused this, I have logs that in August 2020 the email was working correctly.
Joomla logs:
#Date: 2020-11-26 10:53:56 UTC
#Software: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
#Fields: datetime priority clientip category message
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Connection: opening to ssl://smtp.yandex.ru:465, timeout=300, options=array (
)
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Connection: opened
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "220 iva7-f62245f79210.qloud-c.yandex.net ESMTP (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru)
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 220 iva7-f62245f79210.qloud-c.yandex.net ESMTP (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru)
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: EHLO mydomain.com
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-iva7-f62245f79210.qloud-c.yandex.net
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-iva7-f62245f79210.qloud-c.yandex.net
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-8BITMIME
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-iva7-f62245f79210.qloud-c.yandex.net
250-8BITMIME
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-PIPELINING
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-iva7-f62245f79210.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-SIZE 42991616
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-iva7-f62245f79210.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-iva7-f62245f79210.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
250-AUTH LOGIN PLAIN XOAUTH2
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-DSN
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-iva7-f62245f79210.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
250-AUTH LOGIN PLAIN XOAUTH2
250-DSN
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250 ENHANCEDSTATUSCODES
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 250-iva7-f62245f79210.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
250-AUTH LOGIN PLAIN XOAUTH2
250-DSN
250 ENHANCEDSTATUSCODES
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Auth method requested: UNKNOWN
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Auth methods available on the server: LOGIN,PLAIN,XOAUTH2
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Auth method selected: LOGIN
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: AUTH LOGIN
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 334 VXNlcm5hbWU6
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: cGFydXNAdmFsaXRvdi54eXo=
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6
"
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2020-11-26T10:53:56+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER:
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "535 5.7.8 Error: authentication failed: Invalid format.
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 535 5.7.8 Error: authentication failed: Invalid format.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP ERROR: Password command failed: 535 5.7.8 Error: authentication failed: Invalid format.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP Error! Could not authenticate.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: QUIT
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "221 2.0.0 Closing connection.
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 221 2.0.0 Closing connection.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Connection: closed
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP Error! Could not authenticate.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Connection: opening to ssl://smtp.yandex.ru:465, timeout=300, options=array (
)
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Connection: opened
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "220 myt5-95c1fb78270f.qloud-c.yandex.net ESMTP (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru)
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 220 myt5-95c1fb78270f.qloud-c.yandex.net ESMTP (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru)
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: EHLO mydomain.com
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-myt5-95c1fb78270f.qloud-c.yandex.net
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-myt5-95c1fb78270f.qloud-c.yandex.net
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-8BITMIME
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-myt5-95c1fb78270f.qloud-c.yandex.net
250-8BITMIME
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-PIPELINING
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-myt5-95c1fb78270f.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-SIZE 42991616
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-myt5-95c1fb78270f.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-myt5-95c1fb78270f.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
250-AUTH LOGIN PLAIN XOAUTH2
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250-DSN
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is "250-myt5-95c1fb78270f.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
250-AUTH LOGIN PLAIN XOAUTH2
250-DSN
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "250 ENHANCEDSTATUSCODES
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 250-myt5-95c1fb78270f.qloud-c.yandex.net
250-8BITMIME
250-PIPELINING
250-SIZE 42991616
250-AUTH LOGIN PLAIN XOAUTH2
250-DSN
250 ENHANCEDSTATUSCODES
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Auth method requested: UNKNOWN
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Auth methods available on the server: LOGIN,PLAIN,XOAUTH2
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Auth method selected: LOGIN
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: AUTH LOGIN
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 334 VXNlcm5hbWU6
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: cGFydXNAdmFsaXRvdi54eXo=
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER:
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "535 5.7.8 Error: authentication failed: Invalid format.
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 535 5.7.8 Error: authentication failed: Invalid format.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP ERROR: Password command failed: 535 5.7.8 Error: authentication failed: Invalid format.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP Error! Could not authenticate.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: CLIENT -> SERVER: QUIT
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $data is ""
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP -> get_lines(): $str is "221 2.0.0 Closing connection.
"
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SERVER -> CLIENT: 221 2.0.0 Closing connection.
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: Connection: closed
2020-11-26T10:53:57+00:00 ERROR xx.xx.xx.xx mail Error in Mail API: SMTP Error! Could not authenticate.
Note: for privacy reasons I replaced my real user IP address with xx.xx.xx.xx
and website domain name with mydomain.com
.
I suppose the problem relies in PHPMailer
which is outdated in Joomla. I have components that use own mechanism of sending emails via SMTP using PHPMailer v6.1.7 and SwiftMailer v6.2.3 (both transports work great) and they send emails successfully using the same configuration and credentials. It means that the username, password and other SMTP settings that I specify are correct.
I tried to check the Yandex docs and found out that not long time ago they introduced "application passwords" - it's an approach similar to what GMail has, when only official Yandex apps are allowed to use the "main" user password, while any third-party applications (like Outlook or Joomla) are required to have their own password. This rule is auto enabled for new accounts, but I work with accounts that are several years old. Despite of that, for testing purposes on one of my accounts I created an application password and tried to use it, however, the I still got the same error and the same log output.
I also checked that IMAP and POP3 are enabled in the security configuration of the email account. Yandex does not have settings to enable SMTP which is enabled by default.
Yandex has a log of events - when user or his apps access the Yandex service. I see that the failed attempts are not present in this log. This log contains only info about access from my browser when I open the web interface of the email, and logs from the components that send email via PHPMailer v6.1.7 or SwiftMailer.
Labels |
Added:
?
|
The problem is caused by commit 435d780 by @HLeithner
See the line
smtppass
should not be here, otherwise it breaks the SMTP functionality!
For a quickfix this line should look as follow:
private $protectedConfigurtionFields = array('password', 'secret', 'ftp_pass', 'redis_server_auth', 'session_redis_server_auth');
I will post a PR now.
Yes, it seems that normal messages do work!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-11-26 22:51:47 |
Closed_By | ⇒ | HLeithner |
Update: everything works fine with Joomla 3.9.22. The problem happens after upgrade to Joomla 3.9.23!
Successful log at Joomla 3.9.22: