Python – Send email to a list of emails from a spreadsheet
Nowadays working with Google forms is quite popular. It is used to mass gather information easily. Email addresses are one of the most common piece of information asked. It is stored in a spreadsheet. In this article we shall see how to send an email to all the email addresses present in a spreadsheet.
- Step 1: Read the spreadsheet using the
pandaslibrary. The structure of the spreadsheet used here is :
- Step 2: Extablish connection with your gmail account using
- Step 3: Extract the names and email addresses from the spreadsheet.
- Step 4: Run a loop and for every record send an email.
- Step 5: Close the smtp server.
The Python implementation is: