EmailBackend
An email backend for use during test sessions.
Attributes
| Attribute | Type | Description |
|---|---|---|
| outbox | list = [] | The dummy outbox is accessible through the outbox instance attribute. |
Constructor
Signature
def EmailBackend(
*args: any,
**kwargs: any
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| *args | any | Variable length argument list passed to the base class constructor. |
| **kwargs | any | Arbitrary 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
| Name | Type | Description |
|---|---|---|
| messages | list | A collection of email message objects to be validated and stored in the test outbox |
Returns
| Type | Description |
|---|---|
int | The total number of email messages successfully processed and appended to the outbox |