kerno.email.pyramid_mailer module

A complement to our email module, for those who use pyramid_mailer.

class kerno.email.pyramid_mailer.EmailMessage(mailer_settings: Dict[str, str], **kw)[source]

Bases: kerno.email.EmailMessageBase

Abstract base class with methods that depend on pyramid_mailer.

to_message() pyramid_mailer.message.Message[source]

Convert this instance into a pyramid_mailer Message.

to_message_args() Dict[str, Any][source]

Convert this into a dict to instantiate a pyramid_mailer Message.

This is useful because Celery likes to use JSON serialization.