hypha.core.mail
¶
MarkdownMail
¶
Bases: object
Render and send an html + plain-text email using a markdown template.
Usages:
email = MarkdownMail("messages/email/send_reset_email.md") email.send(to='xyz@email.com', from=settings.DEFAULT_FROM_EMAIL, context={'key': 'value'})
Translates the email based on Django settings or 'lang' parameter available in the context.
Adds Auto-Submitted
header.
Source code in hypha/core/mail.py
make_email_object
¶
Source code in hypha/core/mail.py
send
¶
remove_extra_empty_lines
¶
Removes extra blank lines and spaces from markdown generated using Django templates. Do this for readably of markdown itself.