Page 1 of 1

Too many emails in one go perhaps? - how to fix sendmail?

Posted: Mon Feb 16, 2009 11:19 am
by tata668
Hi,

I had to send +/- 100 emails. I did it with a 5 seconds pause between each email. But even then, at one point, I received this error:

-----
Unable to send email : !There was a problem reading line 1 of an SMTP response. The response so far was:
[]. It appears the connection has died without saying goodbye to us! Too many emails in one go perhaps? (fsockopen: #0)
-----

I know there are some plugins to help fix this problem in SwiftMailer (AntiFlood and Throttler), but since I'm on a dedicated server and have access to sendmail configuration, I would prefere to change sendmail instead of using a plugin. Can someone points me to any help on how to change sendmail configuration so I don't have this emails/minutes limit? I have no idea where to look at. I'm quite a newbie using sendmail!

Thanks a lot in advance!

Re: Too many emails in one go perhaps? - how to fix sendmail?

Posted: Mon Feb 16, 2009 7:50 pm
by Chris Corbyn
Changing the sendmail configuration may not even fix this problem. It occurs when the stress imposed on the server is so high that it fails to respond back to Swift Mailer.

There are a few things you can do:

a) Use batchSend() instead of send() if possible
b) Make use of try/catch to handle the Exception
c) Use the AntiFlood plugin to allow the server to rest.

Re: Too many emails in one go perhaps? - how to fix sendmail?

Posted: Mon Feb 16, 2009 8:02 pm
by tata668
Thanks a lot, I'll test that!

Re: Too many emails in one go perhaps? - how to fix sendmail?

Posted: Mon Feb 16, 2009 8:03 pm
by Chris Corbyn
Could you also try using version 4.0.0-b5 that is linked to at the top of this forum? :) It may be more error-tolerant.

You will need to rewrite the code for this though.

Re: Too many emails in one go perhaps? - how to fix sendmail?

Posted: Mon Feb 16, 2009 8:10 pm
by tata668
I'll do it, thanks for the suggestion.