sendmail#
- sendmail(sendaddr, recvaddrs, subject, content, *, subtype='plain', user=None)#
Send an email to addresses in recvaddrs
- Parameters:
sendaddr – The sending address. If None, it will be set to the user name of this process is user @ the current machine.
recvaddrs – Either a single email address (string), or list of email addresses.
subtype – subtype sent to MIMEText. Use “html” for sending content that contains html (but do not include <html><body> at the beginning and </body></html> at the end).
user – If sendaddr is None, user is the user name used in the sendaddr. If None, user will be determined
- Raises:
SendMailError – if email could not be sent
- create_message(content, subtype)#
- get_sender_address(*, user=None)#
- exception SendMailError(recvaddrs, error)#
Bases:
Exception