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
92053acbb9
Fixed E128 flake8 warnings in tests/.
2016-04-08 10:12:33 -04:00
Hasan
253adc2b8a
Refs #26022 -- Used context manager version of assertRaisesMessage in tests.
2016-01-29 13:03:39 -05:00
Hasan
3d0dcd7f5a
Refs #26022 -- Used context manager version of assertRaises in tests.
2016-01-29 12:32:18 -05:00
Dražen Odobašić
b1e33ceced
Fixed #23395 -- Limited line lengths to 119 characters.
2015-09-12 11:40:50 -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
Rolo
e7b4bd48c7
Fixed #24970 -- Added --managers and --admins options to the sendtestemail management command.
2015-06-22 07:21:26 -04:00
Shai Berger
071801ccff
Cleanup: Removed the try-except-fail antipattern from tests
...
Found cases where testing code was doing
try:
whatever
except (some excption type):
self.fail("exception shouldn't be thrown")
replaced it with just
whatever
as this makes the unexpected errors easier to debug, and the tests
would fail just as much and aren't rendered less readable.
Thanks Markus Holtermann for review
2015-06-05 12:57:20 +03:00
Tim Graham
7d97c5745e
Refs #23763 -- Fixed SMTPServer Python 3.5 deprecation warning in mail test.
2015-05-18 09:48:25 -04:00
Tim Graham
a3e75f6bed
Removed unused imports.
2015-03-20 17:57:11 -04:00
Claude Paroz
ba37ac749e
Adapted sendtestemail to be more argparse-ish
2015-03-20 20:40:35 +01:00
Tim Graham
4a5d967dfe
Removed unused import.
2015-03-20 13:31:49 -04:00
Tim Graham
7bf775258e
Used testing domain names in mail tests per rfc2606.
2015-03-20 12:19:14 -04:00
Loek van Gent
d898ba1bec
Fixed #24419 -- Added sendtestemail management command
2015-03-20 12:03: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
darkryder
9ec8aa5e5d
Fixed #24149 -- Normalized tuple settings to lists.
2015-02-03 14:59:45 -05:00
Diego Guimarães
e32a8a99d9
Refs #23947 -- Isolated a mail test.
2014-12-06 12:06:06 -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
Thomas Chaumeny
d89f56dc4d
Fixed #21281 -- Made override_settings act at class level when used as a TestCase decorator.
2014-11-03 14:14:39 -05:00
Berker Peksag
f7969b0920
Fixed #23620 -- Used more specific assertions in the Django test suite.
2014-11-03 11:56:37 -05:00
Simon Charette
f6c208d95c
Fixed a flake8 warning.
2014-10-15 16:36:11 -04:00
Florian Apolloner
8d789449c7
Fixed #23063 -- Convert \n and \r to \r\n when using the SMTP backend as per RFC.
2014-10-12 22:01:24 +02:00
José Padilla
5472d18e31
Fixed #23461 -- Added EMAIL_TIMEOUT setting
2014-09-13 09:33:21 -04:00
Andi Albrecht
00535e8e6b
Fixed #20743 -- Added support for keyfile/certfile in SMTP connections.
...
Thanks jwmayfield, serg.partizan, and Wojciech Banaś for work on the patch.
2014-09-10 11:14:20 -04:00
Alex Gaynor
1dcc603eff
Fixed several typos in Django
2014-05-28 17:39:14 -07:00
Claude Paroz
e520a73eee
Harmonized some PEP 0263 coding preambles
2014-05-15 19:58:41 +02:00
Daniel Neuhäuser
4aa80149e7
Fixed #22327 -- Turned BaseEmailBackend into a context manager
...
Changed the BaseEmailBackend to allow usage as context manager to open
and close connections.
2014-03-31 14:08:51 -04:00
Alex Gaynor
778ce245dd
Corrected many style guide violations that the newest version of flake8 catches
2014-03-30 12:11:05 -07:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Marc Tamlyn
22198e6ce5
Be more careful about closing connections in mail tests.
2014-01-12 23:39:44 +00:00
Marc Tamlyn
9d2c5b0420
Undelete the `return True` removed in 4e0a2fe
.
...
This is quite important otherwise we don't close our connections to the
SMTP server.
2014-01-12 23:38:28 +00:00
Florian Apolloner
c988745cca
Changed console and filebackend to use msg.as_bytes to output the data as it would get send via smtp.
2013-12-30 23:46:05 +01:00
Florian Apolloner
5dfd824d38
Introduced as_bytes for SafeMIMEText (and other SafeMIME-classes).
...
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-12-28 18:35:17 +01:00
Aymeric Augustin
e32095616c
Imported override_settings from its new location.
2013-12-23 21:37:56 +01:00
Loic Bistuer
6685713869
Fixed E127 pep8 warnings.
2013-12-14 11:59:15 -05:00
Claude Paroz
3afde36d03
Undelete the login() call inadvertantly removed in 4e0a2fe59c
...
Refs #21271 .
2013-10-25 11:23:19 +02:00
SusanTan
4e0a2fe59c
Fixed #21271 -- Added timeout parameter to SMTP EmailBackend.
...
Thanks Tobias McNulty and Tim Graham for discussions and code review.
Thanks Andre Cruz the suggestion and initial patch.
2013-10-24 20:38:00 -04:00
Alasdair Nicol
b289fcf1bf
Fixed #21288 -- Fixed E126 pep8 warnings
2013-10-21 08:31:30 -04:00
Alasdair Nicol
a800036981
Fixed #21287 -- Fixed E123 pep8 warnings
2013-10-18 10:07:39 +01:00
Tim Graham
1dae4ac177
Whitespace cleanup.
...
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
2013-10-10 16:49:20 -04:00
Tim Graham
adedc31072
Fixed "redefinition of unused 'foo' from line X" pyflakes warnings.
2013-10-10 11:09:42 -04:00
Gregor MacGregor
b2b763448f
Fixed #20841 -- Added messages to NotImplementedErrors
...
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
Florian Apolloner
df2fd4e09b
Removed unneeded imports in tests's __init__.py and unified them.
2013-09-09 23:01:07 +02:00
Ramiro Morales
a5cf5da50d
Switched mail tests to SimpleTestCase.
2013-08-21 07:48:16 -03:00
Ramiro Morales
ececbe77ff
Fixed #12422 -- Don't override global email charset behavior for utf-8.
...
Thanks simonb for the report, Claude Paroz and Susan Tan for their work
on a fix.
2013-08-21 07:44:20 -03:00
Ramiro Morales
f9d1d5dc13
Fixed #18967 -- Don't base64-encode message/rfc822 attachments.
...
Thanks Michael Farrell for the report and his work on the fix.
2013-08-20 22:17:26 -03:00
Justin Michalicek
ac09558760
Fixed #20817 -- Added html_message parameter to django.core.mail.send_mail()
2013-07-29 09:53:47 -04:00