Marking e-mail messages

In the previous recipe, we looked at fetching and reading messages. Wasn't it too complicated? Do we have to take care of so many details while doing a simple operation like search or read? In this section, let's look at another library that can help us not only to search or read better, but also to perform various operations on our e-mails.

Getting ready

For this section, we will install the gmail module. You can install this module through your Terminal using the pip command, as shown here:

pip install gmail 

Let's look at how to search for e-mails and read them using gmail APIs. This will get us started with the gmail module. The following code snippet searches for e-mails that were received after July 22, 2016. We then ...

Get Automate it! - Recipes to upskill your business now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.