Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor SMTP support to track sent emails and quotas #33

Merged
merged 6 commits into from
Oct 22, 2023
Merged

Refactor SMTP support to track sent emails and quotas #33

merged 6 commits into from
Oct 22, 2023

Conversation

jmmv
Copy link
Owner

@jmmv jmmv commented Oct 22, 2023

No description provided.

jmmv added 4 commits October 15, 2023 06:43
Move all dependency version numbers to the workspace, as well as a few
specific features.
I'm not sure why I thought that naming the crate after its dependency
was a good idea in the first place, given that the use of lettre is
an implementation detail.

The abstractions in this create already use the Smtp prefix instead
of Lettre, so renaming the crate seems fitting.
I'll soon be adding a database layer to this crate so moving the
existing code into driver and model layers will help.
Modify the queue's get_result() and get_results_since() primitives to
return tasks that failed on an earlier run and are scheduled to rerun
later.

This keeps all callers the same by making the client's wait() and
wait_all() methods ignore retriable tasks until they are fully done.
However, this adds a new wait_once() to wait for a task until it asks
to retry or finishes, whichever happens first.
Introduce the SmtpDriver, which is a higher level mailer over another
mailer that tracks how many messages have been sent so far and disallows
exceeding a configured limit.
@jmmv jmmv merged commit fd55abf into main Oct 22, 2023
6 checks passed
@jmmv jmmv deleted the smtp branch October 22, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant