First time here? Check out the FAQ!
1

Why are emails being sent out as text and not html with post-office as backend?
 

We've recently set up askbot to use python-django-post_office as the email backend at askfedora. I've noticed that the emails we're getting are now plain text, and not html as they used to be.

post-office seems to have two different variables for plain text mail "message", and html mail "html_message" (see the documentation on mail.send toward the end of this page) instead of using the "attach_alternative" system that's advised

Is this the issue?

Filed one nevertheless

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
FranciscoD's avatar
71
FranciscoD
asked 11 years ago

Comments

see more comments

2 Answers

0

This was fixed in python-django-post_office via this issue:

https://github.com/ui/django-post_office/issues/16

HTML mails now work with python-django-post_office as back end too.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
FranciscoD's avatar
71
FranciscoD
answered 11 years ago
link

Comments

see more comments
0

We did not foresee such usage. Possibly functions askbot.mail.send_mail and askbot.mail.mail_moderators can be modified to support other mail backends (other than django-'l "smtp" backend).

If you make a fix like this - please make a pull request on the github.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago
link

Comments

post-office upstream says it isn't needed, since it's implemented as a django email backend itself. Any other clues on what may be causing this?

https://github.com/ui/django-post_office/issues/16#issuecomment-18785924

FranciscoD's avatar FranciscoD (11 years ago)

I'm still trying to figure out the cause @Evgeny. Once we know, I'll try and write a fix if required.

FranciscoD's avatar FranciscoD (11 years ago)
see more comments