smtp phpmailer

microz

Verified User
Joined
Jun 10, 2009
Messages
117
Location
Santiago, Chile
Hi,

I'm testing phpmailer Github (with apache or nginx with php-fpm56), but for some reason i'm getting SMTP Error: Could not connect to SMTP host. Some configuration that I tested:

host - port - encryption
localhost - 587 - tls
domain - 587 - tls
localhost - 25 - none
domain - 25 - none

With a mail client (Geary or thunderbird) this config works well.

Also, I disable smtp_block of csf, but getting same error.

To get more info, I enable phpmailer debug

PHP:
CLIENT -> SERVER: EHLO mydomain.com
CLIENT -> SERVER: STARTTLS
SMTP Error: Could not connect to SMTP host.
CLIENT -> SERVER: QUIT

SMTP Error: Could not connect to SMTP host.
Email Sending Failed - SMTP Error: Could not connect to SMTP host.
Also checked internal and external connect

PHP:
telnet mydomain.com 587
Trying myip...
Connected to mydomain.com.
Escape character is '^]'.
220 mydomain.com ESMTP Exim 4.86 Sun, 13 Dec 2015 03:45:50 -0300
And I comment disable_functions of php.ini

Finally I review the logs, but not there info about this.

someone tried phpmailer? Any suggestion?

Rgds,
Eduardo
 
Last edited:

microz

Verified User
Joined
Jun 10, 2009
Messages
117
Location
Santiago, Chile
Thanks!

Then the correct way would be to add a certificate (ex. possitivessl, rapidssl, etc.) to exim. If so, I have some doubs, I should register ssl certificate to one fqdn and setup using this guide?

Rgds,
Eduardo
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
You should use the same name as in the trusted SSL cert. With the correct and trusted SSL cert you won't need to change SMTPOptions of PHPMailer.
 
Top