Email¶
Markdown-templated email.
An email template looks like this:
---
subject: Hello, {{user.first_name}}
---
Welcome to the site.
When using send_markdown_mail()
, its output is placed in a layout to
produce a full html document::
<!DOCTYPE html>
<html>
<body>
{{content}}
</body>
</html>
The default layout is specified in settings.EMAIL_LAYOUT
, but can be
overridden on a per-email basis.
-
fusionbox.mail.
create_markdown_mail
(template, context, to=None, subject=None, from_address='settings.SERVER_EMAIL', layout='settings.EMAIL_LAYOUT')[source]¶ Creates a message from a markdown template and returns it as an
EmailMultiAlternatives
object.
-
fusionbox.mail.
send_markdown_mail
(*args, **kwargs)[source]¶ Wrapper around
create_markdown_mail()
that creates and sends the message in one step.