Skip to main content

mail_admins

Send a message to the admins, as defined by the ADMINS setting.

def mail_admins(
subject: string,
message: string,
fail_silently: boolean = False,
connection: object = None,
html_message: string = None,
using: string = None
) - > None

Send a message to the admins, as defined by the ADMINS setting.

Parameters

NameTypeDescription
subjectstringThe subject line of the email message.
messagestringThe plain-text content of the email message.
fail_silentlyboolean = FalseWhether to suppress exceptions raised during the email sending process.
connectionobject = NoneAn optional backend instance to use for sending the email.
html_messagestring = NoneAn optional HTML version of the message for multipart emails.
usingstring = NoneThe name of the email backend alias to use for sending.

Returns

TypeDescription
NoneReturns nothing; sends an email as a side effect.