Problem with send e-mail via PHPMailer
Posted: 29 Nov 2017, 23:52
Problem description
We had some problems with sending Mantisbt shipping. It uses PHPMailer and gave problem because of Hostname.domain, specifically in "mantis.*" (look at the bug below). I do not know if the problem is in PHPMailer or the mantisbt tool, but we solved it by setting this parameter, like:
t_mail->Helo = 'mantis.domain.com.br'
in
mantis_directory/core/email_api.php
It's not an Issue, but it's a problem we've had and solved it that way.
We get into trouble by running command:
openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:587
and doing the whole SMTP protocol.
Debug output
Error Log:
2017-11-29 23:30:10 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP k21sm2079012qta.27 - gsmtp 2017-11-29 23:30:10 CLIENT -> SERVER: EHLO mantis.* 2017-11-29 23:30:10 SERVER -> CLIENT: 501-5.5.4 HELO/EHLO argument *"mantis.*"* invalid, closing connection. 501 5.5.4 https://support.google.com/mail/?p=helo k21sm2079012qta.27 - gsmtp 2017-11-29 23:30:10 SMTP ERROR: EHLO command failed: 501-5.5.4 HELO/EHLO argument "mantis.*" invalid, closing connection. 501 5.5.4 https://support.google.com/mail/?p=helo k21sm2079012qta.27 - gsmtp 2017-11-29 23:30:10 CLIENT -> SERVER: HELO mantis.* 2017-11-29 23:30:10 SERVER -> CLIENT: 2017-11-29 23:30:10 SMTP ERROR: HELO command failed: 2017-11-29 23:30:10 SMTP NOTICE: EOF caught while checking if connected 2017-11-29 23:30:10 SMTP Error: Could not connect to SMTP host. 2017-11-29 23:30:10 SMTP Error: Could not connect to SMTP host.
Thanks.
We had some problems with sending Mantisbt shipping. It uses PHPMailer and gave problem because of Hostname.domain, specifically in "mantis.*" (look at the bug below). I do not know if the problem is in PHPMailer or the mantisbt tool, but we solved it by setting this parameter, like:
t_mail->Helo = 'mantis.domain.com.br'
in
mantis_directory/core/email_api.php
It's not an Issue, but it's a problem we've had and solved it that way.
We get into trouble by running command:
openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:587
and doing the whole SMTP protocol.
Debug output
Error Log:
2017-11-29 23:30:10 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP k21sm2079012qta.27 - gsmtp 2017-11-29 23:30:10 CLIENT -> SERVER: EHLO mantis.* 2017-11-29 23:30:10 SERVER -> CLIENT: 501-5.5.4 HELO/EHLO argument *"mantis.*"* invalid, closing connection. 501 5.5.4 https://support.google.com/mail/?p=helo k21sm2079012qta.27 - gsmtp 2017-11-29 23:30:10 SMTP ERROR: EHLO command failed: 501-5.5.4 HELO/EHLO argument "mantis.*" invalid, closing connection. 501 5.5.4 https://support.google.com/mail/?p=helo k21sm2079012qta.27 - gsmtp 2017-11-29 23:30:10 CLIENT -> SERVER: HELO mantis.* 2017-11-29 23:30:10 SERVER -> CLIENT: 2017-11-29 23:30:10 SMTP ERROR: HELO command failed: 2017-11-29 23:30:10 SMTP NOTICE: EOF caught while checking if connected 2017-11-29 23:30:10 SMTP Error: Could not connect to SMTP host. 2017-11-29 23:30:10 SMTP Error: Could not connect to SMTP host.
Thanks.