-
Notifications
You must be signed in to change notification settings - Fork 156
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
Connection timeout is not working #41
Comments
I cannot replicate this on my end. <?php
require 'vendor/autoload.php';
use SMTPValidateEmail\Validator as SmtpEmailValidator;
$validator = new SmtpEmailValidator('[email protected]', '[email protected]');
$validator->setConnectTimeout(1);
$smtpResults = $validator->validate();
var_dump($validator->getLog()); I get this output back:
To me, with data from the debug timestamps, this looks like connection attempts failed/timed-out after 1 sec, as requested/specified. So, it appears that connection timeout is working as intended, no? Command-specific timeouts have nothing to do with the connection timeout. They are set as per the (old) RFCs -- feel free to change them yourself if you wish (and/or if you think they are the cause of your delays...). A far more likely cause is that the server is throttling you on purpose (due to what the server thinks is unacceptable behaviour). If I understand you correctly regarding:
This might mean you are suggesting an enhancement/change/fix in the sense that you feel that Whether it'll get merged, I don't know -- but that does not matter if it ends up working for your use-case anyway. |
use SMTPValidateEmail\Validator as SmtpEmailValidator;
$validator = new SmtpEmailValidator('[email protected]', '[email protected]');
$validator->setConnectTimeout(1);
$smtpResults = $validator->validate();
It is waiting 3 minute
Bacause of timeout command_timeouts
If you send timeout using setTimeout - you need to use that setting
The text was updated successfully, but these errors were encountered: