Replies: 2 comments 7 replies
-
This is an extremely common problem that is covered extensively in the troubleshooting guide, so please read that. It's most likely that your hosting provider blocks outbound SMTP, which results in the network being unreachable. This has nothing to do with your script or PHPMailer. You will either need to ask them to remove the block, use a different sending mechanism (such as by sending through their own mail servers), or find a better hosting provider. If that was your real password in your script (I edited it out), I suggest you change it since you've just let the whole world see it. |
Beta Was this translation helpful? Give feedback.
-
bobmonero I also had the same problem and got it fixed by changing the $mail->Port = 587; I mean I changed the port number to the servers own. In your case change 587 to your server's SMTP port number. That should solve the problem. Please note that I didn't test your code |
Beta Was this translation helpful? Give feedback.
-
Hi, dears.
This is my first time with PHPMailer and I have a problem.
In the localhost (EasyPHP), ti's running well. But when I upload it to a host, I receive the message "Error 500" or, by the debug line, "SMTP ERROR: Failed to connect to server: Network is unreachable (101) - SMTP Connect() failed".
I'm trying in two hosts, using PHPMailer 6.4.0. Already tried with older versions.
I tried a lot of previous suggestions in this forum.
My Google account is less secure apps enabled.
This password is for test only and may stay public for today.
Someone can help me, please?
Thank you!
You can access the test page at https://monono.com.br/email/
The PHP script:
Beta Was this translation helpful? Give feedback.
All reactions