Jump to content

SMTP connect failed


Recommended Posts

Hi

 

I have moved my WHMCS 6.2.2 from a PHP 5.5 server to PHP 5.6 from the same web hosting company and I also did a database export and import. How I can't send e-mails from WHMCS using SMTP. I have tried to use gmail smtp server instead but I get the same error:

 

Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ( ) SMTP ERROR: Failed to connect to server: (0) SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

 

My web hosting company is saying the the servers have the same setup and they are not blocking so they think that it is maybe my SMTP library that needs to be updated to support PHP 5.6

 

What can I do to fix this problem?

 

Thanks

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi,

I can confirm that WHMCS is totally compatible with PHP 5.6. However with modern versions of PHP you need to ensure that there is a valid SSL certificate configured for your mail server so that a secure connection can be established.

 

You can work around this temporarily by editing /vendor/phpmail/phpmailer/class.phpmailer.php. FIND:

 

public $SMTPAutoTLS = true;

 

REPLACE WITH:

 

public $SMTPAutoTLS = false;

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated