class<open file '<stdout>', mode 'w'>)[source]

Dumps mail to stdout.

class, db, tell_sentry, root)[source]

Model an outbound email queue.


Load messages queued for sending, and send them.

put(to, template, _user_initiated=True, email=None, **context)[source]

Put an email message on the queue.

  • to (Participant) – the participant to send the email message to. In cases where an email is not linked to a participant, this can be None.
  • template (unicode) – the name of the template to use when rendering the email, corresponding to a filename in emails/ without the file extension
  • email (unicode) – The email address to send this message to. If not provided, the to participant’s primary email is used.
  • _user_initiated (bool) – user-initiated emails are throttled; system-initiated messages don’t count against throttling
  • context (dict) – the values to use when rendering the template

Throttled – if the participant already has a few messages in the queue (that they put there); the specific number is tunable with the EMAIL_QUEUE_ALLOW_UP_TO envvar.



Compile an email template from a simplate.

Parameters:fpath (unicode) – the filesystem path of the simplate