#6918: Cannot set encoding of mail headers, only of message body
-----------------------------------------------------------+----------------
Reporter: Grzegorz Lukasik <[EMAIL PROTECTED]> | Owner:
serialx
Status: assigned | Milestone:
Component: django.core.mail | Version:
SVN
Resolution: | Keywords:
encoding mail headers
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-----------------------------------------------------------+----------------
Changes (by serialx):
* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => serialx
* needs_docs: => 0
* stage: Unreviewed => Accepted
Comment:
Since the send_mail function API is frozen, adding another 'encoding'
parameter may not be added. I'm submitting a patch to resolve this issue
with two possible ways:
1. Add 'encoding' parameter to the send_mail function.
1. Add 'encoding' parameter to the EmailMessage constructor.
It _IS_ currently possible to specify the encoding of the mail using the
EmailMessage like..
{{{
connection = SMTPConnection(username=auth_user, password=auth_password,
fail_silently=fail_silently)
email = EmailMessage(subject, message, from_email, recipient_list,
connection=connection)
email.encoding = 'utf8'
email.send()
}}}
But it does not kill to support encoding parameter in the send_mail and
the constructor.
This patch enables..
{{{
connection = SMTPConnection(username=auth_user, password=auth_password,
fail_silently=fail_silently)
email = EmailMessage(subject, message, from_email, recipient_list,
connection=connection, encoding='utf8').send()
}}}
Or even
{{{
send_mail('Subject here', 'Here is the message.', '[EMAIL PROTECTED]',
['[EMAIL PROTECTED]'], fail_silently=False, encoding='utf8')
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/6918#comment:1>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---