magic_notifier.emailer
Module Contents
Classes
The class is reponsible of email sending. |
Attributes
- magic_notifier.emailer.logger
- class magic_notifier.emailer.Emailer(subject: str, receivers: list, template: Optional[str], context: dict, email_gateway: str = 'default', final_message: str = None, files: list = None, **kwargs)
The class is reponsible of email sending.
- Parameters:
subject – the subject of the notification, ignored when send by sms
receivers – list of User
template – the name of the template to user. Default None
context – the context to be passed to template. Default None
email_gateway – the email gateway to use. Default ‘default’
final_message – the final message to be sent as the notification content, must be sent if template is None, template is ignored if it is sent. Default None
files – list of files to be sent. accept file-like objects, tuple, file path. Default None
kwargs –
- send()
- _send()