| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2025-07-25 | Fixed #35581 -- Updated django.core.mail to Python's modern email API. | Mike Edmunds | |
| - Changed EmailMessage.message() to construct a "modern email API" email.message.EmailMessage and added policy keyword arg. - Added support for modern MIMEPart objects in EmailMessage.attach() (and EmailMessage constructor, EmailMessage.attachments list). - Updated SMTP EmailBackend to use modern email.policy.SMTP. Deprecated: - Attaching MIMEBase objects (replace with MIMEPart) - BadHeaderError (modern email uses ValueError) - SafeMIMEText, SafeMIMEMultipart (unnecessary for modern email) - django.core.mail.forbid_multi_line_headers() (undocumented, but exposed via `__all__` and in wide use) - django.core.mail.message.sanitize_address() (undocumented, but in wide use) Removed without deprecation (all undocumented): - EmailMessage.mixed_subtype - EmailMultiAlternatives.alternative_subtype - Support for setting (undocumented) EmailMessage.encoding property to a legacy email.charset.Charset object Related changes: - Dropped tests for incorrect RFC 2047 encoding of non-ASCII email address localparts. This is specifically prohibited by RFC 2047, and not supported by any known MTA or email client. (Python still mis-applies encoded-word to non-ASCII localparts, but it is a bug that may be fixed in the future.) - Added tests that try to discourage using Python's legacy email APIs in future updates to django.core.mail. | |||
| 2024-01-26 | Applied Black's 2024 stable style. | Mariusz Felisiak | |
| https://github.com/psf/black/releases/tag/24.1.0 | |||
| 2023-10-25 | Fixed #34904 -- Prevented mutating sent emails from outbox in locmem email ↵ | sindre | |
| backend. | |||
| 2023-03-14 | Improved connection clean-up for SMTP backend. | Carlton Gibson | |
| 2023-03-06 | Fixed #34386 -- Made SMTP backend load default system root CA certificates ↵ | Dmitriy Sintsov | |
| by default. Regression in 2848e5d0ce5cf3c31fe87525536093b21d570f69. | |||
| 2022-11-16 | Refs #34118 -- Used smtplib's context parameter instead of keyfile and certfile. | Mariusz Felisiak | |
| keyfile and certfile parameters were removed in Python 3.12, see https://github.com/python/cpython/commit/ef0e72b31d22f780d3a165d7d0471806061fe380 | |||
| 2022-02-07 | Refs #33476 -- Reformatted code with Black. | django-bot | |
| 2019-11-06 | Refs #29983 -- Added pathlib.Path support to the file email backend. | Jon Dufresne | |
| 2019-01-31 | Fixed #30147 -- Simplified directory creation with os.makedirs(..., ↵ | Jon Dufresne | |
| exist_ok=True). | |||
| 2019-01-28 | Fixed #30137 -- Replaced OSError aliases with the canonical OSError. | Jon Dufresne | |
| Used more specific errors (e.g. FileExistsError) as appropriate. | |||
| 2018-12-26 | Fixed #30058 -- Made SMTP EmailBackend.send_messages() return 0 for ↵ | Denis Stebunov | |
| empty/error cases. | |||
| 2017-11-06 | Fixed #28776 -- Fixed a/an/and typos in docs and comments. | Дилян Палаузов | |
| 2017-06-01 | Sorted imports per isort 4.2.9. | Tim Graham | |
| 2017-02-21 | Refs #27656 -- Updated django.core docstring verbs according to PEP 257. | Anton Samarchyan | |
| 2017-02-01 | Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. | Vytis Banaitis | |
| 2017-01-25 | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | |
| 2017-01-20 | Refs #23919 -- Removed unneeded force_str calls | Claude Paroz | |
| 2017-01-19 | Refs #23919 -- Stopped inheriting from object to define new style classes. | Simon Charette | |
| 2017-01-18 | Refs #23919 -- Removed six.<various>_types usage | Claude Paroz | |
| Thanks Tim Graham and Simon Charette for the reviews. | |||
| 2017-01-18 | Refs #23919 -- Removed six.PY2/PY3 usage | Claude Paroz | |
| Thanks Tim Graham for the review. | |||
| 2016-12-23 | Refs #26487 -- Removed unneeded ehlo() calls in SMTP backend. | Tim Graham | |
| starttls(), login(), and other connection methods already call the method as needed. | |||
| 2016-10-21 | Fixed #27368 -- Modifed BaseEmailBackend.__enter__() to close the connection ↵ | Jon Dufresne | |
| if an exception occurs. Fixes unclosed socket ResourceWarning in mail test. Thanks Claude Paroz for the review. | |||
| 2016-10-05 | Removed unused variable in django/core/mail/backends/smtp.py. | Tim Graham | |
| 2016-09-27 | Fixed #27210 -- Allowed SMTPBackend to fail silently on a socket connection ↵ | Vesteinn Snaebjarnarson | |
| error. | |||
| 2016-09-21 | Fixed #26210 -- Prevented SMTP backend from trying to send mail after a ↵ | levental | |
| connection failure. | |||
| 2016-08-31 | Fixed #27131 -- Passed proper string type to SMTP connection login | Claude Paroz | |
| Passing an Unicode string on Python 2 was crashing the connection. Thanks slavugan@gmail.com for the report, and Tim Graham for the review. | |||
| 2016-08-08 | Fixed #27036 -- Made locmem email backend's send_messages() accept generators. | Antoine Fontaine | |
| 2016-05-06 | Fixed #25986 -- Fixed crash sending email with non-ASCII in local part of ↵ | Sergei Maertens | |
| the address. On Python 3, sending emails failed for addresses containing non-ASCII characters due to the usage of the legacy Python email.utils.formataddr() function. This is fixed by using the proper Address object on Python 3. | |||
| 2015-02-06 | Sorted imports with isort; refs #23860. | Tim Graham | |
| 2014-10-12 | Fixed #23063 -- Convert \n and \r to \r\n when using the SMTP backend as per ↵ | Florian Apolloner | |
| RFC. | |||
| 2014-09-13 | Fixed #23461 -- Added EMAIL_TIMEOUT setting | José Padilla | |
| 2014-09-10 | Fixed #20743 -- Added support for keyfile/certfile in SMTP connections. | Andi Albrecht | |
| Thanks jwmayfield, serg.partizan, and Wojciech Banaś for work on the patch. | |||
| 2014-09-05 | Limited lines to 119 characters in django/ | Tim Graham | |
| refs #23395. | |||
| 2014-03-31 | Fixed #22327 -- Turned BaseEmailBackend into a context manager | Daniel Neuhäuser | |
| Changed the BaseEmailBackend to allow usage as context manager to open and close connections. | |||
| 2014-01-12 | Undelete the `return True` removed in 4e0a2fe. | Marc Tamlyn | |
| This is quite important otherwise we don't close our connections to the SMTP server. | |||
| 2013-12-30 | Decode mails using the message encoding. | Florian Apolloner | |
| 2013-12-30 | Changed console and filebackend to use msg.as_bytes to output the data as it ↵ | Florian Apolloner | |
| would get send via smtp. | |||
| 2013-12-28 | Introduced as_bytes for SafeMIMEText (and other SafeMIME-classes). | Florian Apolloner | |
| This is to provide a consistent interface (namely bytes) for the smtp backend which after all sends bytes over the wire; encoding with as_string yields different results since mails as unicode are not really specified. as_string stays for backwardscompatibilty mostly and some debug outputs. But keep in mind that the output doesn't match as_bytes! | |||
| 2013-11-02 | More attacking E302 violators | Alex Gaynor | |
| 2013-10-25 | Undelete the login() call inadvertantly removed in 4e0a2fe59c | Claude Paroz | |
| Refs #21271. | |||
| 2013-10-24 | Fixed #21271 -- Added timeout parameter to SMTP EmailBackend. | SusanTan | |
| Thanks Tobias McNulty and Tim Graham for discussions and code review. Thanks Andre Cruz the suggestion and initial patch. | |||
| 2013-10-24 | Start attacking E231 violations | Alex Gaynor | |
| 2013-10-10 | Whitespace cleanup. | Tim Graham | |
| * Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs. | |||
| 2013-10-05 | Fixed #21189: Cleaned up usage of bare except clauses. | Baptiste Mispelon | |
| Thanks to berkerpeksag for the report and to claudep for the review. | |||
| 2013-09-10 | Fixed #20841 -- Added messages to NotImplementedErrors | Gregor MacGregor | |
| Thanks joseph at vertstudios.com for the suggestion. | |||
| 2013-07-11 | Fixed #17471 -- Added smtplib.SMTP_SSL connection option for SMTP backend | Claude Paroz | |
| Thanks dj.facebook at gmail.com for the report and initial patch and Areski Belaid and senko for improvements. | |||
| 2013-04-03 | Adds generators support for email backends that do not support it. | Brendon Crawford | |
| 2013-01-03 | Replaced deprecated sslerror by ssl.SSLError | Claude Paroz | |
| The exact conditions on which this exception is raised are not known, but this replacement is the best guess we can do at this point. | |||
| 2013-01-03 | Fixed #19382 -- Stopped smtp backend raising exception when already closed | Claude Paroz | |
| Thanks Sebastian Noack for the report and the initial patch. | |||
| 2013-01-03 | Fixed #19134 -- Allowed closing smtp backend when the server is stopped | Claude Paroz | |
| Thanks Sebastian Noack for the report and the initial patch. | |||
