-
Book Overview & Buying
-
Table Of Contents
Python Automation Cookbook - Third Edition
By :
Email is still an inescapable tool for everyday use. It's arguably the best place to send a notification if an automated task has detected something. On the other hand, email inboxes are already too full of spam messages, so be careful.
Spam filters are a reality. Be careful about who emails are sent to, and about the number of emails sent. An email server or address can be labeled as a spam source, and all emails may be quietly dropped by the internet.
This is common in addresses from Internet providers, meaning that setting up your own mail server without special consideration is futile, as all their emails will be immediately dropped.
This recipe shows you how to send a single email using an existing email account. This approach is viable for sending a few emails to a couple of people (e.g. yourself), as a result of an automated task, but no more than that. Refer to Chapter 9, Dealing with Communication Channels, for more ideas on sending emails,...