Path: blob/master/Gmail/Gmail_Read_mailbox.ipynb
2973 views
Gmail - Read mailbox
Tags: #gmail #productivity #naas_drivers #operations #snippet #dataframe
Author: Martin Donadieu
Last update: 2023-05-12 (Created: 2021-04-15)
Description: This notebook allows you to read your Gmail inbox and returns a dataframe:
uid: This column represents the unique identifier associated with each row or email in the dataframe.
subject: The subject column contains the subject line or title of the email.
from: The "from" column contains information about the sender of the email. It includes the email address and name of the sender.
to: The "to" column contains information about the primary recipients of the email. It includes the email addresses and names of the recipients.
cc: The "cc" column represents the carbon copy recipients of the email. It contains a list of email addresses and names of the cc'd recipients.
bcc: The "bcc" column contains the blind carbon copy recipients of the email. Similar to the "cc" column, it includes a list of email addresses and names.
reply_to: This column contains the email addresses and names that should be used when replying to the email.
date: The "date" column indicates the date and time when the email was sent.
text: The "text" column contains the plain text content of the email.
html: The "html" column includes the HTML-formatted content of the email.
flags: The "flags" column represents any flags or indicators associated with the email, such as important, starred, etc. Possible value for flag: 'SEEN', 'ANSWERED', 'FLAGGED', 'DELETED', 'DRAFT', 'RECENT'
headers: This column contains additional headers of the email, such as the "delivered-to," "received," and "X-Google-Smtp-Source" headers.
size_rfc822: The "size_rfc822" column indicates the size of the email in RFC822 format.
size: The "size" column represents the size of the email in bytes.
obj: The "obj" column contains the object representation of the email.
attachments: This column includes any attachments associated with the email, such as files, images, etc.
Input
Import librairy
Setup Variables
Create an application password following this procedure
username
: This variable stores the username or email address associated with the email accountpassword
: This variable stores the password or authentication token required to access the email accountsmtp_server
: This variable represents the SMTP server address used for sending emails.box
: This variable stores the name or identifier of the mailbox or folder within the email account that will be accessed.