diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-05-13 23:01:58 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-05-14 19:42:32 +0200 |
| commit | d4d812cb567d1f84ef7a569672fdf3c0b83e6fdd (patch) | |
| tree | 7a3163e740f3ae9ce1fe344da862eb1b45d0640e /docs/ref/unicode.txt | |
| parent | d3209bf09cb91f95292efce3ec2b29d89235f501 (diff) | |
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.
Diffstat (limited to 'docs/ref/unicode.txt')
| -rw-r--r-- | docs/ref/unicode.txt | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt index c20886775e..d03f388111 100644 --- a/docs/ref/unicode.txt +++ b/docs/ref/unicode.txt @@ -331,28 +331,6 @@ In your development environment, you might need to add a setting to your export LANG="en_US.UTF-8" -Email -===== - -Django's email framework (in ``django.core.mail``) supports Unicode -transparently. You can use Unicode data in the message bodies and any headers. -However, you're still obligated to respect the requirements of the email -specifications, so, for example, email addresses should use only ASCII -characters. - -The following code example demonstrates that everything except email addresses -can be non-ASCII:: - - from django.core.mail import EmailMessage - - subject = 'My visit to Sør-Trøndelag' - sender = 'Arnbjörg Ráðormsdóttir <arnbjorg@example.com>' - recipients = ['Fred <fred@example.com'] - body = '...' - msg = EmailMessage(subject, body, sender, recipients) - msg.attach("Une pièce jointe.pdf", "%PDF-1.4.%...", mimetype="application/pdf") - msg.send() - Form submission =============== |
