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

  • |

    Python iloc, loc, ix Data Retrieving Selection Functions

      Pandas iloc, loc, and ix functions are very powerful ways to quickly select data from your dataframe. Today , we take a quick look at these 3 functions. Credits to Data School, you can check him out in Youtube  In [1]:

      In [2]:

      In [3]:

      Out[3]: City Colors Reported Shape Reported State…

  • | | |

    Deploy Productionalise Azure Machine Learning Algorithm Using Python

    This is a script to consume Azure Machine Learning Model which you build using Azure ML Studio. So basically this is a Request-Response Service (RRS)  according to Microsoft. This was a Boosted Decision Tree Algorithm build with Census Adult Data which is available as one of the Sample DataSet in Azure ML. You can adapt the…

  • | |

    Testing a Basic Linear Regression Model – Data Analysis and Intrepretation

    Testing a Basic Linear Regression Model Background 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.     1)     Program  Code and Output

           #####################     OUTPUT BEGIN  #####################     Axes(0.125,0.125;0.775×0.775) Describe the centered…

  • |

    Save Python Pivot Table in Excel Sheets ExcelWriter

    Untitled This is a quick script on how to save Python pivot_table in an excel file. Credit to  pbpython In [1]:

      In [2]:

     

    In [8]:

      Out[8]: First Name Last Name Sex Phone Fax Email Address Booking Date Departure Date Arrival Date Address1 … Number of Passengers Total Cost Currency Numeric Code…

  • ImportError: No module named ‘scikits’ – Python Fix Jupyter Notebook

    If you have the above problem, to fix this, follow these guidelines as advised by Flowerowl  at this link (https://github.com/muricoca/crab/issues/92): The steps are as follows:   Don’t install crab in this way: pip install crab / easy_install crab You can find crab in pypi.python.org, this is not our scikits.crab source Solution: git clone https://github.com/muricoca/crab.git python setup.py…

  • |

    Declare Public Protected and Private Variables in Python – Object Oriented Programming

    In Python, the scope ( Public, Protected, Private) characteristic of an attribute or member of the class is indicated by “the naming conventions of the member”. These are the naming conventions Public: This means the member can be accessed outside of the class by other instances. The naming convention denotes that it has no underscores…

Leave a Reply

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