Fantomas42/emencia-django-newsletter — Issue #55: Small fix for proper "To" field encoding
Author: nnseva
Created: 2012-02-01 09:57:26+00:00
State: open

```diff
--- emencia/django/newsletter/models.py (revision 12098)
+++ emencia/django/newsletter/models.py (working copy)
@@ -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')