mails.core module

class mails.core.MailEngine(mail_code, subject='', recipient_list=[], bcc=[], from_email='', from_name='', **kwargs)[source]

Bases: object

This engine processes the configuration and template files to be saved into the database in the MailLog table.

validate(render_template=False)[source]

Check if MailEngine is valid and ready for sending.

render_only()[source]

Render template. To be used in mail backend only.

render_template(html_message=None)[source]

Render the template associated with the mail_code. If html_message is given, use this as a template instead.

send_mail()[source]

Send the mail.