Reputation: 117
I'm looping through a list of customers, and sending files to them. The page often times out. Here is the exact error generated, minus my domain name.
Fatal error: Uncaught exception 'Swift_IoException' with message 'Connection to smtp.example.com:25 Timed Out' in C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\StreamBuffer.php:169 Stack trace:
#0 C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\AbstractSmtpTransport.php(400): Swift_Transport_StreamBuffer->readLine(67)
#1 C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\AbstractSmtpTransport.php(277): Swift_Transport_AbstractSmtpTransport->_getFullResponse(67)
#2 C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\EsmtpTransport.php(245): Swift_Transport_AbstractSmtpTransport->executeCommand('??.??', Array, Array)
#3 C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\AbstractSmtpTransport.php(335): Swift_Transport_EsmtpTransport->executeCommand('??.??', Array)
#4 C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\AbstractSmtpTransport.php(428): Swift_Transport_AbstractSmtpTransport->_streamMessage(Object(Swift_Message))
#5 C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\AbstractSmtpTransport.php(444): Swift_Tra in C:\inetpub\wwwroot\inc\lib\classes\Swift\Transport\StreamBuffer.php on line 169
I'm not sure if this is PHP timeout, or some sort of SMTP server timeout.
If this is PHP, I can try to increase my timeout there. I have tried adding
set_time_limit (0);
to the top of my .php file, but that didn't help, should I be adding that to the function itself as the first line?
Upvotes: 1
Views: 7581
Reputation: 304
I just posted a working solution to your (our!) problem on How to close Smtp connection in SwiftMailer tell me if it works for you as well. Cheers
Upvotes: 3