How to limit to 100 emails per hour using php?

Most email providers such as Mailgun have a limit on sending emails (100 emails per hour)
Has the user base and there is a need to do the newsletter.
As better and more correct to implement a metered mailing list? Through the crowns and in the database to do the queue distribution? Or is there other options?
April 9th 20 at 09:50
2 answers
April 9th 20 at 09:52
So. And you can configure the local Postfix with the quota limit
I think it's a little different, I don't send out emails from your server and use API of the postal service for mail delivery. - sam_Blanda commented on April 9th 20 at 09:55
@Fay.Wisozk99, It's generally standard practice to raise your pochtar for shipment. Mail server can do everything is usually better and more flexible. You're in the app just send a mail to the server and he really understands the transfer to the upstream server, the frequency of the send is not delivered letters, communication protocols and other non obvious things. - orville80 commented on April 9th 20 at 09:58
April 9th 20 at 09:54
Most of ratelimited usually works through the base -
when sending checks the number sent in the last hour-if not exceeded - are sent and incremented number, if the current hour != what time is it in the database to reset the counter and record.
you also need to decide what to do if the limit is exceeded (don't send just to queue and what to do if the queue is growing all the time)

Find more questions by tags E-mailBackendPHPMail server