Opened 11 years ago

Closed 10 years ago

#22327 closed New feature (fixed)

Turn BaseEmailBackend into a contextmanager

Reported by: DasIch Owned by: nobody
Component: Core (Mail) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be useful to turn BaseEmailBackend (and thereby it's subclasses) into a contextmanager, that calls .open() and .close(), specifically for sending multiple mails over the same connection. This is implemented in a pull request: https://github.com/django/django/pull/2467

Change History (2)

comment:1 by Tim Graham, 11 years ago

Triage Stage: UnreviewedAccepted
Version: master

comment:2 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 4aa80149e71d02947164a89ec5da6fd035393425:

Fixed #22327 -- Turned BaseEmailBackend into a context manager

Changed the BaseEmailBackend to allow usage as context manager to open
and close connections.

Note: See TracTickets for help on using tickets.
Back to Top