Utility classes for sending simple email messages.
MailMessage(from_address, to_addresses, subject, rst_message, charset='utf-8')¶
Represents an email message, with one part containing plain text (presumed to be ReST), and the other an HTML representation of the same message.
- from_address – The “from” email address
- to_addresses – A list of “to” email addresses
- subject – The subject line
- rst_message – A message, expressed as a string containing ReStructured Text
- charset – The charset of rst_message
Returns the message as ASCII-encoded string for sending.
Mailer(smtp_host='localhost', smtp_port=8025, smtp_user=None, smtp_password=None)¶
A proxy for a remote SMTP server.
- smtp_host – The host to connect to.
- smtp_port – The port to connect to.
- smtp_user – The username to use (if specified) for authentication.
- smtp_password – The password to authenticate with the smtp host
Returns a Mailer, using the host and port of the system configuration.