Skip to content
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

PHP hangs when trying to send 'tls' to port 465 #629

Closed
koogle opened this issue Feb 10, 2016 · 5 comments
Closed

PHP hangs when trying to send 'tls' to port 465 #629

koogle opened this issue Feb 10, 2016 · 5 comments

Comments

@koogle
Copy link

koogle commented Feb 10, 2016

The combination of

$mail->SMTPSecure = 'tls';
$mail->Port = 465;

results in the total php script becoming totally unresponsive .
Might be related #604

@Synchro
Copy link
Member

Synchro commented Feb 10, 2016

Since #604 suggests that PHP itself lacks the ability to time out correctly, I don't know there's anything we can do - unless you have any better solutions? With that combo I would expect it to open a tcp connection successfully, but then be unable to transmit or receive anything over it due to the broken encryption layer. An appropriate solution is "don't do that" - it's not as if correct values are undocumented. SMTPS on port 465 has been deprecated for 18 years anyway.

@koogle koogle changed the title PHP hangs when try to send 'tls' to port 465 PHP hangs when trying to send 'tls' to port 465 Feb 10, 2016
@koogle
Copy link
Author

koogle commented Feb 10, 2016

I agree with you on that. I would suggest of issuing a warning calling $mail->send() or putting it in the README (if you prefer something I would just create a PR for that).

@Synchro
Copy link
Member

Synchro commented Feb 11, 2016

A warning for what? We can't know there's a problem until it happens, at which point we can't do anything. You're free to use any protocol on any port, not just standard ones (e.g. it's common to use tls on port 25, and I've seen SMTPS on port 80), so we can't reasonably issue warnings where there isn't a problem as it would just be annoying. The standard port/proto combos are well documented, covered in the troubleshooting guide, and all examples use correct defaults. That said, it would be a good thing to check in the proposed diagnostic function in #612.

@koogle
Copy link
Author

koogle commented Feb 17, 2016

Okay. Maybe then I just add a section for this in the troubleshooting guide? Just to let other devs know that there is this problem inside PHP and how it affects PHPMailer.

@ThomasPerraudin
Copy link

Have you tried with 'ssl' ?

@Synchro Synchro closed this as completed Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants