Commit Graph

146 Commits

Author SHA1 Message Date
Min ho Kim 65e86948b8 Corrected several typos in string literals and test names. 2019-08-07 11:23:14 +02:00
Chason Chaffin 55b68de643 Fixed #30608 -- Fixed non-unicode EmailMessage crash when domain name for localhost is non-ASCII.
Assisted by felixxm.
2019-07-03 10:49:03 +02:00
Mariusz Felisiak f226bdbf4e Refs #30608 -- Added django.utils.encoding.punycode(). 2019-07-03 10:48:02 +02:00
Hasan Ramezani 090ca6512f Fixed #30604 -- Made mail_admins()/mail_managers() raise ValueError if ADMINS/MANAGERS is set incorrectly. 2019-07-02 07:34:07 +02:00
Joachim Jablon 2628ea9515 Fixed #30512 -- Used email.headerregistry.parser for parsing emails in sanitize_address(). 2019-06-13 16:22:15 +02:00
Aymeric Augustin 3bb6a4390c Refs #27753 -- Favored force/smart_str() over force/smart_text(). 2019-02-06 14:12:06 -05:00
Jon Dufresne 290d8471bb Fixed #30147 -- Simplified directory creation with os.makedirs(..., exist_ok=True). 2019-01-31 12:53:36 -05:00
Jon Dufresne 7785e03ba8 Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
2019-01-28 11:15:06 -05:00
Denis Stebunov 277de22984 Fixed #30058 -- Made SMTP EmailBackend.send_messages() return 0 for empty/error cases. 2018-12-26 13:33:08 -05:00
jannschu efc0f77f02 Fixed #29830 -- Fixed loss of custom utf-8 body encoding in mails. 2018-10-22 15:21:33 -04:00
Tom 11b8c30b9e Ref #23919 -- Replaced some os.path usage with pathlib.Path. 2018-04-19 21:30:00 -04:00
Mariusz Felisiak 362813d628
Fixed hanging indentation in various code. 2018-03-16 10:54:34 +01:00
Williams Mendez 2691ed7ba1 Fixed #29140 -- Fixed EmailMessage crash when body is None. 2018-02-20 09:34:01 -05:00
Дилян Палаузов a38ae914d8 Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements. 2018-01-12 12:44:50 -05:00
Дилян Палаузов d7b2aa24f7 Fixed #28982 -- Simplified code with and/or. 2018-01-03 20:12:23 -05:00
Jon Dufresne da82939e5a Fixed #28912 -- Made EmailMessage.message() omit an empty To header. 2017-12-30 09:38:03 -05:00
Jon Dufresne b03d500295 Fixed #28971 -- Made EmailMessage.message() set Cc from headers dict if it exists. 2017-12-30 09:37:59 -05:00
Дилян Палаузов 6c0042430e Fixed #28776 -- Fixed a/an/and typos in docs and comments. 2017-11-06 22:41:03 -05:00
Igor Tokarev af35c69a3c Fixed #26344 -- Made EmailMessage include alternatives when the body is empty and it has attachments. 2017-09-04 08:46:11 -04:00
Tim Graham cde31daf88 Sorted imports per isort 4.2.9. 2017-06-01 13:23:48 -04:00
Tom 94475aab80 Replaced some map() and filter() calls with generators. 2017-05-27 13:58:56 -04:00
Claude Paroz d4d812cb56 Refs #28196 -- Removed mentions of bytestrings for EmailMessage
With Python 3, there are no more reasons to special-case EmailMessage
arguments which should be plain strings.
2017-05-14 19:42:32 +02:00
Claude Paroz 301de774c2 Refs #27795 -- Replaced many force_text() with str()
Thanks Tim Graham for the review.
2017-04-27 09:10:02 +02:00
kalombo dd00184892 Fixed #28042 -- Fixed crash when using a two-tuple in EmailMessage's attachments arg. 2017-04-07 18:02:34 -04:00
Claude Paroz 9a9e228321 Fixed #27848 -- Prevented crash when attaching a .eml file to a message
Thanks Sébastien Ramage for the report.
2017-04-01 16:19:03 +02:00
Anton Samarchyan 5a6f70b428 Refs #27656 -- Updated django.core docstring verbs according to PEP 257. 2017-02-21 11:58:42 -05:00
Tim Graham 500532c95d Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode(). 2017-02-09 09:03:47 -05:00
Vytis Banaitis 8838d4dd49 Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. 2017-02-01 11:41:56 -05:00
Claude Paroz 068cd60366 Removed unneeded parentheses in class definitions 2017-01-29 18:06:26 +01:00
Vytis Banaitis d1bab24e01 Refs #23919, #27778 -- Removed obsolete mentions of unicode. 2017-01-26 08:19:27 -05:00
Tim Graham 1c466994d9 Refs #23919 -- Removed misc Python 2/3 references. 2017-01-25 13:59:25 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz 042b7350a0 Refs #23919 -- Removed unneeded str() calls 2017-01-20 14:13:55 +01:00
Claude Paroz dc8834cad4 Refs #23919 -- Removed unneeded force_str calls 2017-01-20 08:44:31 +01:00
Tim Graham 9e917cc291 Fixed #23905, refs #23919 -- Used make_msgid() from stdlib. 2017-01-19 12:58:19 -05:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz 2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz 7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Claude Paroz 9390533951 Fixed #27696 -- Measured email long lines on encoded content
Thanks Pavel Pokrovskiy for the report and Tim Graham for the review.
2017-01-06 16:04:59 +01:00
Tim Graham bcae045de0 Refs #26487 -- Removed unneeded ehlo() calls in SMTP backend.
starttls(), login(), and other connection methods already call
the method as needed.
2016-12-23 09:22:23 -05:00
Ramin Farajpour Cami 967be82443 Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
Claude Paroz 8858631498 Fixed #27469 -- Prevented sending email to empty addresses
Thanks Jarek Glowacki for the report.
2016-11-10 19:47:02 +01:00
Jon Dufresne 9b9c8c4a81 Fixed #27368 -- Modifed BaseEmailBackend.__enter__() to close the connection if an exception occurs.
Fixes unclosed socket ResourceWarning in mail test.

Thanks Claude Paroz for the review.
2016-10-21 05:59:07 -07:00
Claude Paroz 458e2fbfcc Fixed #27333 -- Prevented BASE64 encoding in message.as_string() on Python 3
Thanks Tim Graham for the review.
2016-10-12 20:48:09 +02:00
Tim Graham d5c0eb7d68 Removed unused variable in django/core/mail/backends/smtp.py. 2016-10-05 11:16:45 -04:00
Vesteinn Snaebjarnarson 602bffe758 Fixed #27210 -- Allowed SMTPBackend to fail silently on a socket connection error. 2016-09-27 14:34:49 -04:00
levental 42dc9d0400 Fixed #26210 -- Prevented SMTP backend from trying to send mail after a connection failure. 2016-09-21 16:45:10 -04:00
Claude Paroz fe252c0a5a Fixed #27131 -- Passed proper string type to SMTP connection login
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-31 09:00:41 +02:00