1. Patrick Samson
  2. django-postman
  3. Issues
Issue #33 invalid

Missing body text in rendered email

Matt Guy
created an issue

I am using Django-Postman as an internal messaging system with smtp email notification. I am struggling to get it to send the message body with the email. The default template email_user.txt calls template tags such as {{ sender }} and {{ body }}. sender, subject and others render well, but body contains nothing in the sent email, even if the body text is rendering nicely elsewhere, like in received messages and in print statements placed in views etc.

I have trawled through the app for clues, but can't work out what's going on. Does anybody have any debugging thoughts? Seems like a bug as I thought this should work by default. Thanks

Also posted here: http://stackoverflow.com/questions/18315290/inaccessible-form-data-in-django-postman-template

Comments (3)

  1. Patrick Samson repo owner

    First, something wrong: the default template email_user.txt does not mention any {{ body }} template tag.

    Including the contents of the message into the notification email is commonly discouraged, as it should only be a notification that some event arises.

    If you really want to have it, make your own template to override the default one (refer to docs) and use: {{ object.body }}

  2. Log in to comment