Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fix for proper "To" field encoding #55

Open
nnseva opened this issue Feb 1, 2012 · 1 comment
Open

Small fix for proper "To" field encoding #55

nnseva opened this issue Feb 1, 2012 · 1 comment

Comments

@nnseva
Copy link

nnseva commented Feb 1, 2012

--- emencia/django/newsletter/models.py.orig
+++ emencia/django/newsletter/models.py
@@ -126,7 +126,7 @@

     def mail_format(self):
         if self.first_name and self.last_name:
-            return '%s %s <%s>' % (self.last_name, self.first_name, self.email)
+            return '"%s %s" <%s>' % (unicode(self.last_name).encode('utf-8'), unicode(self.first_name).encode('utf-8'), unicode(self.email).encode('utf-8'))
         return self.email
     mail_format.short_description = _('mail format')
@xaralis
Copy link

xaralis commented Apr 17, 2012

Please, incorporate this as soon as possible, I have had just the same problem and it wasn't really easy to find out whats wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants