Skip to content

More granular control of how many emails to send. #156

@Hafnernuss

Description

@Hafnernuss

I just stumbled across this project and it seems to do everything I want, including some sort of rate limiting.
Currently I have to live with the fact that I can only send a few thousand emails per day.
Typically, most emails will have to be sent during business hours (different timezones are not an issue for now), and outside of those there wont be much to do, except an occasional password reset.

Using something like django-celery-beat I would setup a few periodic tasks that run every minute (one from midnight to 0600, one from 0600 till 1800 and one from 1800 till midnight) and adjust the admount of emails sent by each task. (e.g. the one from 1800 until midnight can only send one per minute, while another might send 5 per minute.

The three config parameters

MAILER_EMAIL_MAX_BATCH = None  # integer or None
MAILER_EMAIL_MAX_DEFERRED = None  # integer or None
MAILER_EMAIL_THROTTLE = 0  # passed to time.sleep()

seem quite helpful, but it would be great if I could pass a number of emails that should be sent to one of the management commands.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions