![]() These canīe either MIMEBase instances, or (filename, content, mimetype) triples. attachments: A list of attachments to put on the message.New connection is created when send() is called. You want to use the same connection for multiple messages. ![]() connection: An email backend instance.bcc: A list or tuple of addresses used in the “Bcc” header when.to: A list or tuple of recipient addresses.subject: The subject line of the email.The EmailMessage class is initialized with theįollowing parameters (in the given order, if positional arguments are used).Īll parameters are optional and can be set at any time prior to calling the The return value will be the number of successfully delivered messages (whichĬan be 0 or 1 since it can only send one message).ĮmailMessage Objects ¶ class EmailMessage ¶ Text/plain content type and html_message as the Multipart/alternative email with message as the html_message: If html_message is provided, the resulting email will be a.If unspecified, an instance of the default backend will be used. connection: The optional email backend to use to send the mail.If this isn’t provided, Django will use the value of the auth_password: The optional password to use to authenticate to the.auth_user: The optional username to use to authenticate to the SMTP. ![]() See the smtplibĭocs for a list of possible exceptions, all of which are subclasses of When it’s False, send_mail() will raiseĪn smtplib.SMTPException if an error occurs. Member of recipient_list will see the other recipients in the “To:”
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |