Skip to main content

Added v0.5

Send an email - such as to alert someone when a recipe is finished or if it fails.

Tabset

Run​

Recipe​

run:
on_failure:
- notification.email:
user: user@domain.com
password: password
subject: subject
body: body

# Optional
host: smtp.service
to: example@email.com
cc:
- example@email.com
- example2@email.com
bcc:
- boss@email.com
name: Joe Bloggs
domain: my_domain.com

Function​

from wrangles.connectors.notification import email
email.run(
user = 'user@domain.com',
password = 'password',
subject = 'subject',
body = 'body'
)

Parameters​

ParameterRequiredData TypeNotes
user✓strThe user to send the email from. This may be your full email address, but depends on your service.
password✓strThe password for the user to send from.
subject✓strThe subject of the email.
body✓strThe body of the email.
hoststrThe SMTP server for your service. This may be omitted for common services such as yahoo, gmail or hotmail but will be needed otherwise.
tostr / listAn email or list of emails to send the email to. If omitted, the email will be sent to the sender.
ccstr / listAn email or list of emails to cc the email to.
bccstr / listBlind Carbon Copy email address(es).
namestrThe name to show the email as being from. If omitted, defaults to the user.
domainstrThe domain to send the email under. If omitted, it will be inferred from the user
attachmentstr / listA file or list of files to send as attachments
ifstrA condition that will determine whether the action runs or not as a whole.