-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting in php 7.4 #2868
Comments
I am using the latest PHPMailer version but again same error |
Have you perhaps considered reading the docs that tell you how to diagnose and resolve this issue, that you have now been pointed at 3 times? |
I have tried all the ways but the issue is the same |
So why haven't you posted the results of your tests in here that show it's a problem with PHPMailer rather than your hosting? If your hosting provider blocks outbound SMTP (which is quite likely), there is nothing I can do. There is nothing I can suggest here that's not in the docs. |
this error should be display from my testing
|
That's the error that shows that it's failing to connect, not tests that will show why. What happened when you tried to use the openssl command line client? What results do you get from DNS and connectivity tests? |
This is a project in core-PHP and I work in Cpanel |
PHP is PHP. That you're running it in a way that means you can't debug it is your own problem. Unfortunately, cpanel makes many things difficult and confusing. There's really nothing I can do if you don't understand your own hosting, and it has nothing to do with PHPMailer. |
// delete for website link and put the email - [email protected] and click the submit button and scroll down the error print |
Even if there is a problem in hosting, this error "SMTP Error: Could not connect to SMTP host. Failed to connect to server" comes? |
Set |
I have set please check |
Yes, it's a problem with your hosting, not your script or PHPMailer. This is the important part of the error output:
"Network is unreachable" means that your hosting provider is blocking your outbound SMTP traffic, so PHPMailer can't work. This is what it says in the docs. It also tells you what to do in that situation, which is either ask them to stop blocking it, or find a better hosting provider. |
ok I check thanks for the help |
The text was updated successfully, but these errors were encountered: