Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 1, 2024Dec 1 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, 2024Dec 1 by sound
December 1, 2024Dec 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/
December 2, 2024Dec 2 Author 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
December 2, 2024Dec 2 Community Expert Im not sure how resetting a connection would stop you having over 350. Am I misunderstanding something?
December 2, 2024Dec 2 Author 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, 2024Dec 2 by sound
January 24Jan 24 Added a bug report 🙂Has this been patched yet? According to my log, I just experienced this Wed, and it stopped at 350. A couple of others stopped at different points
January 24Jan 24 Community Expert Has this been patched yet? According to my log, I just experienced this Wed, and it stopped at 350. A couple of others stopped at different pointsNot as of yet, no
January 24Jan 24 Not as of yet, noOkay. thank you. I’m guessing it's not in the 4.7.20 update as that is as beta 5 already, I suspect, will be released soonish. So the monthly update after that? a patch?Or should I go in and mess with the file as suggested above?
January 24Jan 24 Community Expert Its not in 20, and would be in a future release, is all I can say at this point. It will not likely be in a patch.