get_connection
Load an email backend and return an instance of it.
def get_connection(
backend: string = None,
fail_silently: boolean = False,
**kwds: dict
) - > BaseEmailBackend
Load an email backend and return an instance of it. If backend is None (default), use settings.EMAIL_BACKEND. Both fail_silently and other keyword arguments are used in the constructor of the backend.
Parameters
| Name | Type | Description |
|---|---|---|
| backend | string = None | The Python import path to the email backend class to instantiate. If omitted, the EMAIL_BACKEND setting is used. |
| fail_silently | boolean = False | A flag passed to the backend constructor to determine whether to suppress exceptions during email operations. |
| **kwds | dict | Additional keyword arguments passed directly to the constructor of the email backend class. |
Returns
| Type | Description |
|---|---|
BaseEmailBackend | An instance of the specified email backend class, initialized with the provided keyword arguments. |