#26227: Unicode attachment filename
---------------------------+-----------------------------------------------
Reporter: | Owner: nobody
TheDeadOne |
Type: Bug | Status: new
Component: Core | Version: 1.9
(Mail) |
Severity: Normal | Keywords: email attachment, filenames, i18n
Triage Stage: | Has patch: 0
Unreviewed |
Easy pickings: 0 | UI/UX: 0
---------------------------+-----------------------------------------------
When attaching a file with name containing non ASCII symbols, GMail
display this attachment as "noname" and Zimbra 8.0.2 as percent-encoded.
{{{
from django.template.loader import get_template
from django.core.mail import send_mail, EmailMultiAlternatives
txt_msg_body = get_template('email.txt').render({})
html_msg_body = get_template('email.html').render({})
msg = EmailMultiAlternatives('Test', txt_msg_body, '[email protected]',
['[email protected]'])
msg.attach_alternative(html_msg_body, "text/html")
with open('test.pdf', 'rb') as fh:
data = fh.read()
msg.attach(u'Имя файла', data, 'application/pdf')
msg.send()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26227>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.f120bf766f452a06d0d3ae3da2ad8327%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.