Skip to main content

EmailBackend

An email backend for use during test sessions.

Attributes

AttributeTypeDescription
outboxlist = []The dummy outbox is accessible through the outbox instance attribute.

Constructor

Signature

def EmailBackend(
*args: any,
**kwargs: any
) - > null

Parameters

NameTypeDescription
*argsanyVariable length argument list passed to the base class constructor.
**kwargsanyArbitrary keyword arguments passed to the base class constructor.

Methods


send_messages()

@classmethod
def send_messages(
messages: list
) - > int

Redirect messages to the dummy outbox

Parameters

NameTypeDescription
messageslistA collection of email message objects to be validated and stored in the test outbox

Returns

TypeDescription
intThe total number of email messages successfully processed and appended to the outbox