anvil.email module contains functions for sending and receiving email in your Anvil app.
Create a new ‘Address’ object
address - string
The email address this object represents.
name - string
The name associated with the address this object represents.
raw_value - string
The full string value of this address.
Create a new ‘DeliveryFailure’ object
Create a new ‘Message’ object
Return the value of the specified header, or default value if it is not present.
Case-insensitive. If the header is specified multiple times, returns the first value.
Return a list containing every value of the specified header. Case-insensitive.
reply([cc=], [bcc=], [from_address=], [from_name=], [text=], [html=], [attachments=])
Reply to this email.
addressees - anvil.email.Message.Addressees instance
The addresses this email was sent from and to, according to the headers.
attachments - list(anvil.Media instance)
A list of this email’s attachments.
dkim - anvil.email.Message.DKIM instance
Object describing whether this message was signed by the sending domain
envelope - anvil.email.Message.Envelope instance
The sender and receipient of this email, according to the SMTP envelope.
headers - list
All the headers in this email, as a list of (name,value) pairs.
html - string
The HTML content of this email, or None if there is no HTML part.
inline_attachments - dict(string,anvil.Media instance)
A dictionary of this email’s inline attachments. Keys are ContentID headers, values are the attachments as Media Objects.
subject - string
The subject of this email, or None if there is no subject.
text - string
The plain-text content of this email, or None if there is no plain-text part.
Create a new ‘SendFailure’ object
Create a new ‘SendReport’ object
message_id - string
The Message-ID header given to this outgoing message.
send([to=], [cc=], [bcc=], [from_address="no-reply"], [from_name=], [subject=], [text=], [html=], [attachments=], [inline_attachments=]) → anvil.email.SendReport instance
Send an email