HostGator SMTP Error: Could not connect to SMTP host #3034
-
I am getting the error I am attempting to upgrade to the new PHPMailer package since I am currently using the old package with PHPMailerAutoload but my web server is upgrading PHP to v8.3 which does not work with the old PHPMailer package. I went through the troubleshooting guide but still cannot figure out what is going wrong. I verified I do have the For testing, I am running this on the web server itself with PHP v8.3. Here is my code:
The above returns this error log in the browser:
I also checked the
I checked HostGator's email connection settings to verify I am using the correct settings for SMTP - they use port 465. This is the current production version that is working with PHP 7.4:
Any help would be greatly appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This looks like a TLS problem, which may be configured differently in your new PHP build – try the openssl tests outlined in the troubleshooting guide. |
Beta Was this translation helpful? Give feedback.
Thanks for your prompt response.
I tried
ENCRYPTION_STARTTLS
on port587
even though HostGator doesn't officially support it to see if it would give me a better error message because, like it says in the troubleshooting guide, the implicit encryption hides error messages making it hard to debug.It ended up working and it spit out an error message about an authentication error due to invalid credentials. I was not expecting this because I am using those same credentials in my old script using a deprecated version of PHPMailer on PHP v7.4. I tried to log into the email server directly with the password I was using in the script and it didn't work so I reset the password and was able to log…