Problem with send e-mail via PHPMailer

General discussion of Mantis.

Moderators: Contributor, Developer

Problem with send e-mail via PHPMailer

Postby victorlopes » Nov 29, 2017 6:52 pm

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.
victorlopes
 
Posts: 2
Joined: Jul 12, 2017 6:51 pm

Re: Problem with send e-mail via PHPMailer

Postby victorlopes » Nov 30, 2017 10:34 am

So, in fact, it's an issue, the problem must be at the point where Mantisbt does the SMTP protocol. It should probably be picking up the hostname.domain parameter incorrectly.
victorlopes
 
Posts: 2
Joined: Jul 12, 2017 6:51 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 9 guests