Skip to content
New issue

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

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

Already on GitHub? # to your account

Pass send_mail return values through backend.deliver #100

Open
powderflask opened this issue Apr 10, 2021 · 0 comments
Open

Pass send_mail return values through backend.deliver #100

powderflask opened this issue Apr 10, 2021 · 0 comments

Comments

@powderflask
Copy link

Problem:
backend.deliver returns True when backend.can_send, regardless of potential issues in, e.g., smtp backend
For example, if the SMTP connection fails, backend.deliver still returns True.

This means I can't detect and handle cases where an important notification is not sent.

Proposed Solution:
backend.deliver currently returns nothing, so could be adapted to pass along value from underlying backend (e.g., send_mail)
models.send_now (and other send functions) returns True or False. I'd recommend returning True only if notification was successfully sent by at least one backend.

Have not considered alternatives nor looked too deeply into the implications for other backend types. Wanted to ask if this is something you'd consider a pull-request for before going further?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant