coddingtonbear / django-mailbox

Import mail from POP3, IMAP, local email mailboxes or directly from Postfix or Exim4 into your Django application automatically.
MIT License
357 stars 166 forks source link

Raw UTF-8 in Django Admin #226

Closed mkayander closed 4 years ago

mkayander commented 4 years ago

Hello! Great project, thanks for the hard work.

So i sent some mails back and forth, and i've noticed that in Django Admin the text is in raw UTF-8. The language is Russian.

image

My PostgreSQL database uses UTF-8 as default encoding, i have some russian text stored on my own django models and i can view/edit it in Django Admin without issues.

Can someone please help me out on this? Thanks!

mkayander commented 4 years ago

Found the issue. So i used django email message class (EmailMultiAlternatives) and in my case i had to specify it's attribute like this: email.encoding = "UTF-8" Works well now.