apicrud.messaging.format¶
format.py
MIME and SMS formatting
created 15-aug-2020 by docker@instantlinux.net
Functions
|
Format an email message with mime attachment, in the user’s profile-determined locale |
|
Format an SMS message content (str): i18n dict frm (Contact): contact of sender to (Contact): contact of recipient **kwargs: other key=value pairs for jinja2 substitution |
-
apicrud.messaging.format.
email
(content, frm, sender_email, to, settings, db_session, i18n, **kwargs)¶ Format an email message with mime attachment, in the user’s profile-determined locale
- Parameters
content (str) – i18n dict
frm (Contact) – contact of sender
sender_email (str) – destination address
to (Contact) – contact of recipient
settings (obj) – account settings
db_session – database session
i18n – localization context
**kwargs – other key=value pairs for jinja2 substitution
- Returns
mime object (the as_string() method will convert to message)