Min ho Kim
65e86948b8
Corrected several typos in string literals and test names.
2019-08-07 11:23:14 +02:00
Mariusz Felisiak
f226bdbf4e
Refs #30608 -- Added django.utils.encoding.punycode().
2019-07-03 10:48:02 +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
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
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
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
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
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
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
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
Michael Schwarz
72d541b61c
Fixed #27007 -- Handled non-UTF-8 bytes objects for text/* attachments.
...
The fallback logic which allows non-UTF-8 encoded files to be passed to
attach_file() even when a `text/*` mime type has been specified is
moved to attach(). Both functions now fall back to a content type of
`application/octet-stream`.
A side effect is that a file's content is decoded in memory instead of
opening it in text mode and reading it into a string.
Some mimetype-related logic in _create_attachment() has become
obsolete as the code moved from attach_file() to attach() already
handles this.
2016-08-12 16:35:09 -04:00
Claude Paroz
04b7b28812
Fixed #26802 -- Prevented crash when attaching bytes as text message
...
Thanks Tim Graham for the review.
2016-07-08 11:58:05 +02:00
Anton I. Sipos
c3495bb984
Fixed #12666 -- Added EMAIL_USE_LOCALTIME setting.
...
When EMAIL_USE_LOCALTIME=True, send emails with a Date header
in the local time zone.
2016-06-04 09:55:50 -04:00
Vasiliy Faronov
31e0314979
Fixed #26580 -- Updated references to obsolete RFC 2822.
...
Didn't rename django.utils.feedgenerator.rfc2822_date()
as some external code may rely on it.
2016-05-10 11:24:51 -04:00
Sergei Maertens
ec009ef1d8
Fixed #25986 -- Fixed crash sending email with non-ASCII in local part of 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.
2016-05-06 14:34:11 -04:00
Claude Paroz
836d475afe
Fixed #22561 -- Prevented too long lines in email messages
...
Thanks NotSqrt for the excellent report and Tim Graham for the review.
2016-04-19 09:35:24 +02:00
Tim Graham
df8d8d4292
Fixed E128 flake8 warnings in django/.
2016-04-08 09:51:06 -04:00
Konrad Świat
c6da621def
Fixed #24623 -- Fixed EmailMessage.attach_file() with text files on Python 3.
...
Thanks tkrapp for the report and Tim Graham for the review.
2015-07-25 07:42:30 -04:00
Tim Graham
6e3fe089dd
Replaced six.BytesIO with io.BytesIO
2015-07-20 08:19:47 -04:00
Tim Graham
7f1168e387
Removed support for Python 3.3.
2015-06-18 08:36:50 -04:00
medmunds
5993b52e6d
Fixed #24416 -- Added support for lazy email addresses.
2015-03-13 12:33:49 -04:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Tim Graham
fed25f1105
Removed compatibility with Python 3.2.
2015-01-17 09:00:17 -05:00
Martin Blech
e023ceb453
Fixed #23910 -- Added reply_to parameter to EmailMessage
...
Thanks to Berker Peksag and Tim Graham for the review and suggestions.
2014-11-28 06:00:06 -05:00
Martin Blech
abf87333a1
Fixed #23924 -- Made EmailMessage raise TypeError for type checks
2014-11-27 18:43:45 -05:00
Tim Graham
ebb927c4c9
Removed workaround for lack of os.getpid() in Jython.
...
The Jython bug was fixed in http://bugs.jython.org/issue1518
(tested on Jython 2.7b3); also updated make_msgid() to be more like
the version in Python 3.2+; refs #23905 .
Thanks Simon Charette for testing and review.
2014-11-24 14:01:15 -05:00