send_mass_mail
Given a datatuple of (subject, message, from_email, recipient_list), send each message to each recipient list. Return the number of emails sent. If from_email is None, use the DEFAULT_FROM_EMAIL setting. Note: The API for this method is frozen. New code wanting to extend the functionality should use the EmailMessage class directly.
def send_mass_mail(
datatuple: tuple,
fail_silently: boolean = False,
auth_user: string = None,
auth_password: string = None,
connection: object = None,
using: string = None
) - > int
Given a datatuple of (subject, message, from_email, recipient_list), send each message to each recipient list. Return the number of emails sent.
Parameters
| Name | Type | Description |
|---|---|---|
| datatuple | tuple | An iterable of tuples, where each tuple contains (subject, message, from_email, recipient_list) for an individual email. |
| fail_silently | boolean = False | A boolean that, when True, suppresses exceptions raised during the mail sending process. |
| auth_user | string = None | The username to use for authenticating with the SMTP server. |
| auth_password | string = None | The password to use for authenticating with the SMTP server. |
| connection | object = None | An optional email backend instance to use for sending the mail. |
| using | string = None | The alias of the email backend configuration to use as defined in settings. |
Returns
| Type | Description |
|---|---|
int | The total number of email messages successfully sent. |