Sending Email Using Python Smtplib Automate Email Sending Alerts

When you have a script running and you have logs set , you might also want to send yourself or colleagues, email alerts in case things go wrong or simply to let you know that your scripts ran to completion without any problems.

 

In this short notes, we take a look at sending email using Python. We will send our emails via Gmail.

Credits to sentdex.  You can check him out on Youtube.

In [13]:

 

In [14]:

 

In [15]:

 

 Check your email to see that email has been sent.
Hope this helps 🙂
Happy sending!
Want more information like this?

Similar Posts

  • | |

    Running a Classification Tree – Decision Tree – Data Analysis and Intrepretation

    Overview My research work deals with Ghana, a country from the Gapminder dataset as has already been discussed from the beginning and progression through this course. Picture Of My Final Decision Tree Outputted From My Python Program   The variables in my observation dataset are all quantitative. For the purposes of this assignment, I have binned…

  • Python Pandas Pivot Table Index location Percentage calculation on Two columns

    pivot table for year on year This is a quick example of how to use pivot_table,  to calculate year on year percentage sales . In [162]:

      In [163]:

     

    In [164]:

      Out[164]: First Name Last Name Sex Phone Fax Email Address Booking Date Departure Date Arrival Date Address1 … Number of Passengers…

  • |

    Python List Comprehension Dictionary Set Comprehension and For Loops

    This is a guide on Python List comprehension. List comprehension is a great way to write simple and easy to read Python codes. You can use it dictionaries and sets as well.   Credits to  Corey Schafer , creator of Python course materials. lets create a list In [115]:

      Out[115]:

    lets grab all the…

  • WindowsError: [Error 5] Access is denied: Anaconda Python Pip Installs and Upgrade

    I was trying to run a pip install ( pip install scikit-learn) and I encountered this error:

    This is the bit we are interested in ”

    ” if you look at the error it states “WindowsError” Hence the Access Denied error is due to not having the right level of privileges to carry…

  • Getting Stock Prices from Yahoo and plotting Python 3 Matplolib Urllib

    This is  some quick notes about getting stock data from Yahoo and plotting it using Matplotlib . The Python version used is Python 3.5 Credits to sentdex.  You can check him out on Youtube. In [11]:

      In [12]:

      In [13]:

      In [14]:

        Want more information like this?

Leave a Reply

Your email address will not be published. Required fields are marked *