mentat.emails.base module

This module contains base class for various types of email messages and reports, that are generated and sent by Mentat system.

class mentat.emails.base.BaseEmail(headers, **kwargs)[source]

Bases: object

Base class for various types of email messages and reports.


Return email as string ready to be passed to sendmail library.


Return list of email destinations (‘To’, ‘Cc’).


Return list of all email destinations (‘To’, ‘Cc’, ‘Bcc’).

get_header(name, default=None)[source]

Return given email header.

report_class = None
report_type = None
mentat.emails.base.REPORT_CLASS_HEADER = 'X-Mentat-Report-Class'

Custom email header: Report class

mentat.emails.base.REPORT_ID_HEADER = 'X-Mentat-Report-Id'

Custom email header: Unique report identifier

mentat.emails.base.REPORT_TYPE_HEADER = 'X-Mentat-Report-Type'

Custom email header: Report type