API

class fmail.FAttachment(path: str)

Utility class to store and pass files to mail

class fmail.FMail(config=None, app=None)

Main class used to send emails with specified config

dispatch()

Not implemented Dispatch messages to celery queue

init_app(app)

Not tested Flask integration Load mail server configuration from Flask config

retry()

Not implemented Retry messages from failed celery queue

send(obj, config=None)

Send mail or list of mails :type obj: FMessage | list[FMessage] :type config: FMailConfig

Pass optional custom config to send messages

class fmail.FMailConfig(host: str, port: int, username: str, password: str)

Utility class to store mail server configuration

exception fmail.FMailError
class fmail.FMessage(subject: str, body_plain: str, body_html: str, from_addr: str, to_addrs: list = None, cc_addrs: list = None, bcc_addrs: list = None, attachments: list = None)

Mail message class used to store whole mail data

build()

Build multipart message

get_message()

Return payload for sendmail