websauna.system.mail.mailer module

class websauna.system.mail.mailer.NullMailer[source]

Bases: object

Ignore all otugoing mail and only increase send count.

Functional testing email backend.

send(message, fail_silently=False)

Save message to a file for debugging

send_immediately(message, fail_silently=False)

Save message to a file for debugging

send_immediately_sendmail(message, fail_silently=False)

Save message to a file for debugging

send_sendmail(message, fail_silently=False)

Save message to a file for debugging

send_to_queue(message, fail_silently=False)

Save message to a file for debugging

class websauna.system.mail.mailer.StdoutMailer[source]

Bases: object

Print all outgoing email to console.

Used by the development server.

send(message, fail_silently=False)

Save message to a file for debugging

send_immediately(message, fail_silently=False)

Save message to a file for debugging

send_immediately_sendmail(message, fail_silently=False)

Save message to a file for debugging

send_sendmail(message, fail_silently=False)

Save message to a file for debugging

send_to_queue(message, fail_silently=False)

Save message to a file for debugging

class websauna.system.mail.mailer.ThreadFriendlyDummyMailer[source]

Bases: pyramid_mailer.mailer.DummyMailer

Multi-thread aware mailing test backend.

We store outbox messages in class globals. If a web server or another thread sends out a message this allows us to access the message in a test thread.

outbox = []
queue = []
classmethod reset()[source]