mlex Posted April 9, 2017 Posted April 9, 2017 Hey folks, I have some troubles sending an email through PHP to gmail via PHPMailer and ports 465(ssl) and/or 587(tls). Any chance you could open 465(preferably, I guess, because it's more secure) port, please? Update 01: On other hand, it would be much wiser to use 587 port, due the fact that SSL on port 465 was deprecated long time ago(1998)
Luigi123 Posted April 9, 2017 Posted April 9, 2017 This support request is being escalated to our root admin.
Krydos Posted April 10, 2017 Posted April 10, 2017 Tommy's port 587 in and port 587 out are both open.
mlex Posted April 11, 2017 Author Posted April 11, 2017 This is weird, because I'm getting an error with connectivity: SMTP ERROR: Failed to connect to server: Network is unreachable (101)SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting My SMTP at gmail are open;I've google it and found out from older posts at "https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting", that this is clearly(99%) a connectivity problem of the server. Is it possible to test it via telnet smtp.gmail.com 587 , so we could be sure in if it's blocked on server level or not?
Krydos Posted April 11, 2017 Posted April 11, 2017 Johnny -> Tommy root@johnny [~]# nc tommy.heliohost.org 587 220-tommy.heliohost.org ESMTP Exim 4.87 #1 Tue, 11 Apr 2017 08:18:40 -0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. ^C Tommy -> Johnny root@tommy [~]# nc johnny.heliohost.org 587 220-johnny.heliohost.org ESMTP Exim 4.88 #1 Tue, 11 Apr 2017 08:16:19 -0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. ^C
mlex Posted April 11, 2017 Author Posted April 11, 2017 Not sure what you exactly meant by that, Krydos. But I tried to google the output of the logs and found out the solution by commenting the following line: $mail->isSMTP();This is odd, because this actually should tell PHPMailer to use SMTP. Did you actually meant by this:220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. I'm abusing(trying to) the system or something? Because this obviously not the case
Krydos Posted April 14, 2017 Posted April 14, 2017 No, I was showing you that port 587 outbound and 587 inbound are open on Tommy.
mlex Posted April 17, 2017 Author Posted April 17, 2017 Glad to hear that, Krydos. I actually found out that commenting the $mail->isSMTP(); in PHPMailer isn't really solving the problem, because this actually tells PHPMailer to use default mail() function instead of SMTP. This error (Failed to connect to server: Network is unreachable) with PHPMailer is very common at GoDaddy hosting and as far as I googled it, it's about hosting-related issues with the port or something on the server's end. I could make a simple page for testing specifically this and give you a link to that with all the access you'll need, to observe the problem, perhaps this could help to figure out why is it through this error if the ports are open
Krydos Posted April 19, 2017 Posted April 19, 2017 Sure, ports 587 out and 587 in are definitely open though. Does google have to whitelist the incoming connection IP perhaps like how our remote mysql is set up?
Recommended Posts