sound Posted December 1 Posted December 1 (edited) Email error log when sending a bulk email fills up with errors which includes every so often the below message Amazon SES, SMTP Error Response: 421 Connection closed by server. Maximum message count per session reached investigation led to this topic here https://repost.aws/questions/QUw5qK9rBFSKqXvW5a-nAteg/amazon-ses-smtp-error-response-421-connection-closed-by-server-maximum-message-count-per-session-reached it says there may be a new limit of 350 calls from 19 Nov 2024 which fits in with the same date that they appeared in my email error log Anyone else sending over 350 emails seeing this problem? Edited December 1 by sound
Randy Calvert Posted December 1 Posted December 1 Don't use SMTP... it can slow down performance when you have very large topics as a result of notifications, and there are situations like this. There are a few third party plugins that leverages the APIs to send mail through SES using the API. For example, @Jon Erickson has one that I've personally used that is fantastic and has worked great... https://store.deschutesdesigngroup.com/buy/0182a1f0-48ea-4438-9b40-293441be9f85 @stoo2000 also has one as well. I've not personally used it, but including a link for you. https://ipb.silvesterwebdesigns.com/file/9-mail-bouncer/ stoo2000 1
sound Posted December 2 Author Posted December 2 16 hours ago, Randy Calvert said: Don't use SMTP... it can slow down performance when you have very large topics as a result of notifications, and there are situations like this. There are a few third party plugins that leverages the APIs to send mail through SES using the API. For example, @Jon Erickson has one that I've personally used that is fantastic and has worked great... https://store.deschutesdesigngroup.com/buy/0182a1f0-48ea-4438-9b40-293441be9f85 @stoo2000 also has one as well. I've not personally used it, but including a link for you. https://ipb.silvesterwebdesigns.com/file/9-mail-bouncer/ thanks, that's something to consider, ideally once v5 out a quick and dirty fix appears to be comment out the return line 99 in smtp.php public function connect( $checkSsl=TRUE ) { /* Do we already have a connection? */ if( array_key_exists( $this->connectionKey, static::$smtp ) ) { ///nov2024 return; } once done a 6k newsletter sent without error and the edit sort of validates this statement Reset SMTP connections: Your suggestion to reset the SMTP connection before retrying to send a message that received this specific error is excellent. This will start a new session and should allow you to continue sending. It's a good practice to reset the connection after receiving this error, and it may indeed be beneficial to do so for other 4xx errors as well. @Marc maybe another forum be better suited
Marc Posted December 2 Posted December 2 Im not sure how resetting a connection would stop you having over 350. Am I misunderstanding something?
sound Posted December 2 Author Posted December 2 (edited) 20 minutes ago, Marc said: Im not sure how resetting a connection would stop you having over 350. Am I misunderstanding something? as far as I can make out the below happens when you hit the 'new' limit of 350 messages, aws returns an error but my site doesn't close the SMTP connection and so any following message sends from my site fails till the next time out by commenting out the above line - my site now asks for a new connection each time the connect routine runs and so all the following emails after the error are always sent as said it for me it seems a quick and dirty fix that has got my 6k+ newsletter sending with no errors the link posted in the op has more technical info and recommendations Edited December 2 by sound
Recommended Posts