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
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
Antoine Fontaine
004ba05bca
Fixed #27036 -- Made locmem email backend's send_messages() accept generators.
2016-08-08 20:13:29 -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
7da3923ba0
Sorted imports in __init__.py files.
2015-06-27 11:53:33 -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