Commit Graph

40 Commits

Author SHA1 Message Date
Claude Paroz 8599f64e54 Fixed #18861 -- Triggered message validation with locmem email backend
Thanks Bruno Renié for the report and the initial patch.
2012-09-22 15:17:13 +02:00
Alex Gaynor 335a9f9cf1 Removed many uses of bare "except:", which were either going to a) silence real issues, or b) were impossible to hit. 2012-09-07 15:08:07 -04:00
Claude Paroz 6e4c984098 [py3] Workarounded a Python bug in mail header encoding 2012-08-17 20:19:14 +02:00
Claude Paroz 751774c29f [py3] Fixed mail tests with Python 3 2012-08-09 20:13:29 +02:00
Aymeric Augustin c5ef65bcf3 [py3] Ported django.utils.encoding.
* Renamed smart_unicode to smart_text (but kept the old name under
  Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
  and smart_bytes under Python 2 (which is backwards compatible).
  Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
  want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin 3cb2457f46 [py3] Replaced basestring by six.string_types. 2012-07-22 09:29:54 +02:00
Alex Gaynor e0fce8706d Switch to using context managers for acquiring and releasing locks. 2012-06-23 08:11:15 -07:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz d7dfab59ea Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Claude Paroz 8bb5b60628 Fixed #17811 -- Added connection parameter in call to EmailMessage from send_mass_mail. Thanks fed239 for the report and danielr for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29 18:53:27 +00:00
Ramiro Morales 665ec600a4 Made email attachment handling code accept non-ASCII filenames.
Thanks to Anton Chaporgin for the report and to Claude Paroz for the patch.

Fixes #14964.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-15 02:33:31 +00:00
Aymeric Augustin 5e75678c8b Fixed #17444 -- Made it possible to customize the 'To' header in emails.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-30 12:44:35 +00:00
Alex Gaynor 0609255dd2 Remove this deprecated alias.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 21:00:25 +00:00
Jannis Leidel ddaca29d3d Fixed a bunch of imports of the email stdlib module now that we are on Python 2.5 to ease the Python 3 port. Thanks, Martin von Löwis.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 16:18:38 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Jannis Leidel 3bd23ee96f Fixed #15750 -- Handle empty mail server credentials gracefully. Thanks, LeandroSouza and bedmondmark.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-03 17:56:05 +00:00
Jannis Leidel 2abd7af4dd Fixed #11212 -- Stopped using quoted-printable encoding for mails with non-ASCII characters but rely on 8bit encoding instead. Thanks, phr, gisle and Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-07 16:59:33 +00:00
Russell Keith-Magee af00f29ecb Advanced deprecations in core.mail, core.commands, core.context_processors and core.handlers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:37:53 +00:00
Adrian Holovaty 94af19c43f Changed e-mail to email throughout documentation and codebase. The one exception is translation strings, which I didn't want to disrupt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-01 16:10:22 +00:00
Adrian Holovaty 13864703bc Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:11:19 +00:00
Ramiro Morales b1a0ad0079 Fixed #15520 -- Fixed incompatibility with email module shipped with Python 2.4 introduced in r15669. Thanks dobcey for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-28 14:07:59 +00:00
Ramiro Morales 70d3c84d18 Fixed #13433 -- Changed default behavior of Django email message wrappers to not mangle lines starting with 'From '. Thanks Leo for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-28 02:42:28 +00:00
Russell Keith-Magee 11997218ee Fixed #15042 -- Ensured that email addresses without a domain can still be mail recipients. Patch also improves the IDN handling introduced by r15006, and refactors the test suite to ensure even feature coverage. Thanks to net147 for the report, and to Łukasz Rekucki for the awesome patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-15 05:55:24 +00:00
Jannis Leidel d4ef841495 Fixed #14301 -- Further refine changes made in r14216 to support non-ASCII characters in email addresses. Thanks, Claude Peroz and Andi Albrecht.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21 15:26:49 +00:00
Russell Keith-Magee 29c4a578af Fixed #10863 -- Added HTML support to mail_managers() and mail_admins(), and used this to provide more and prettier detail in error emails. Thanks to boxed for the suggestion, and to Rob Hudson and Brodie Rao for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-06 14:21:51 +00:00
Jannis Leidel 36f2f7ee7c Fixed #14301 -- Handle email validation gracefully with email addresses containing non-ASCII characters. Thanks, Andi Albrecht.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 18:37:05 +00:00
Jannis Leidel d739737015 Fixed #13494 -- Correctly concat an email subject prefix with a translation string. Thanks, hcarvalhoalves and Andi Albrecht.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 22:27:45 +00:00
Russell Keith-Magee 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +00:00
Luke Plant 0aa438a3df Fixed #7722 - added support for CC in EmailMessage.
Thanks to roberto.digirolamo for the report and initial patch, and
dougvanhorn and SmileyChris for further work on the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-07 23:36:02 +00:00
Russell Keith-Magee db5be42c12 Fixed #13259 -- Ensure that multiple calls to message() don't corrupt any extra message headers. Thanks to canburak for the report, and Andi Albrecht for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-01 15:16:26 +00:00
Karen Tracey a2c4ad1dab Fixed #6918: Adjusted the test in r12683 to more specifically look for what it is testing so it doesn't get thrown off by other minor differences in email ouput (hopefully). Also put a docstring back in its place.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-06 15:50:12 +00:00
Karen Tracey 68f4d1256a Fixed #6918, #12791: If an email message has an encoding, actually use that encoding to encode body and headers. Thanks for patch with tests oyvind.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-05 21:27:58 +00:00
Russell Keith-Magee e07560a88e Modified the way EMAIL_BACKEND is specified to make it consistent with the new "use the class name" policy for backends.
This is a BACKWARDS-INCOMPATIBLE CHANGE for anyone using a manually
specified EMAIL_BACKEND setting. If you have manually specified
EMAIL_BACKEND, you will need to append ".EmailBackend" to your
existing EMAIL_BACKEND setting. See the django-dev mailing list for
details.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-04 12:05:04 +00:00
Russell Keith-Magee 78ad0a61a9 Expanded on the SMTPConnection deprecation notes, and made the deprecation a PendingDeprecationWarning as per the deprecation guidelines.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-03 14:58:58 +00:00
Russell Keith-Magee 90a9f81d37 Fixed #12147 -- Replaced use of try-except-finally to allow for Python 2.4 support. Thanks to knutin for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-04 11:38:06 +00:00
Russell Keith-Magee dd5d7622a5 Fixed #11144 -- When a to/from/cc header contains unicode, make sure the email addresses are parsed correctly (especially with regards to commas). Thanks to rmt for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-04 11:24:56 +00:00
Russell Keith-Magee 77b602a4ab Fixed #11849 -- Corrected handling of use_tls in the SMTP mail handler. Thanks to aromano for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-04 01:59:05 +00:00
Russell Keith-Magee aba5389326 Fixed #10355 -- Added an API for pluggable e-mail backends.
Thanks to Andi Albrecht for his work on this patch, and to everyone else that contributed during design and development.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 12:53:26 +00:00