fluiddyn.util.mail

Mail (fluiddyn.util.mail)

Provides:

fluiddyn.util.mail.send_email(subject, txt, address_recipients, address_sender=None, server='localhost', files=None)[source]

Send an email.

Inspired by an example in https://docs.python.org/2/library/email-examples.html

Parameters:
subjectstr or unicode

The subject of the email.

txt{str, unicode}

The text of the email.

address_recipients{str, list}

The recipient(s) of the mail.

address_sender{None, str}

The sender.

server{None, str}

A string defining a SMTP server (for example ‘localhost:25’)

fileslist

A list of files that have to be attached.

Notes

You may have to start a SMTP local server.

Functions

send_email(subject, txt, address_recipients)

Send an email.