ItzNotABug / ghosler

Send newsletter emails to your Ghost CMS subscribers & members, using your own email credentials!
Apache License 2.0
40 stars 5 forks source link

Email Per Second Limits with SES #25

Closed ItzNotABug closed 5 months ago

ItzNotABug commented 6 months ago

Hi @ItzNotABug

I am not opening an incident as it is more of a query than an incident. I have contracted AWS SES as my SMTP provider. I have a limit of 50K/day and 14 emails per second. Something curious happens. Ghosler has managed to send 588 of the 1352 emails correctly.

I ask with ignorance. I have seen that Ghosler uses nodemailer. Is this configured in your program as infinite? https://medium.com/@susanne.lundkvist/using-nodemailer-to-send-bulk-emails-cbad289fce0e

I don't know if Nodemailer will be blocking so much mass mailing as well.

Ghosler shows this error:

[2024-01-08 17:59:39 UTC] => [ERROR] => Newsletter: Error: Message failed: 454 Throttling failure: Maximum sending rate exceeded.

It shows as if it is checking the AWS SES limit, but this is not the case. Googling I see this article from 2015 (https://github.com/nodemailer/nodemailer/issues/436) also about the same "pool" issue.

If nodemailer is not the problem. Is there a way for Ghosler to detect the members that did not receive the email and do a "retry". If it detects that there are 1352 members (in my case) but only 588 emails sent. I don't know if it detects which emails could not be sent, and proceed with a retry. Or adding some "queue" for emails.

Thanks!!

Captura de pantalla 2024-01-08 a las 20 18 32

Originally posted by @viriatusX in https://github.com/ItzNotABug/ghosler/issues/14#issuecomment-1881686017

viriatusX commented 6 months ago

Thanks for your work. Tomorrow I will publish a new article and I will be able to test it. I asked SES for an increase and they have charged me 200K/day and 100 per second. With these parameters in Ghosler, I should have no problem tomorrow, right?

Captura de pantalla 2024-01-09 a las 16 36 08 Captura de pantalla 2024-01-09 a las 16 36 59

I will give you an answer tomorrow. Thanks again

ItzNotABug commented 6 months ago

That should probably work. Let me know how it goes!

Maybe I'll subscribe to the newsletter too, haha!

viriatusX commented 6 months ago

Now yes!!!!! Works perfectly!! Have you received the newsletter? :)

Captura de pantalla 2024-01-09 a las 20 04 44

ItzNotABug commented 5 months ago

@viriatusX That's great to hear! And Yes, I did receive the newsletter email! 🚀

Would you have some idea as to how much time did it take overall?

viriatusX commented 5 months ago

Ghosler did it in 36 batches. I didn't count the exact seconds. But less than 2 minutes for sure. From what I saw, it went from 0 sent in "sending" status to 1353 in "sent" status. All correct without any error logs. The time it took is perfect

Thanks for your work seriously 👏

ItzNotABug commented 5 months ago

This is fixed via the previously linked PR #26. Thanks for the report & the testing @viriatusX.

Feel free to open a new issue if you find any other problem.