#22327 closed New feature (fixed)

Turn BaseEmailBackend into a contextmanager

Reported by: DasIch Owned by: nobody
Component: Core (Mail) Version: master
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 Changed 12 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version set to master

comment:2 Changed 12 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

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