Jul-21-2020, 11:19 AM
Hello everyone,
I'm new to python, so any help would be much appreciated.
My project is to create a script that logs in to a Gmail account and provide the
Following details:
10 latest emails from a specific sender
Email's subject
Email's Date & Time
I succeed creating a code sample that logs in to a gmail account>inbox>all mail list:
My starting position.
Any corrections & additions would be very helpful.
Thank you
I'm new to python, so any help would be much appreciated.
My project is to create a script that logs in to a Gmail account and provide the
Following details:
10 latest emails from a specific sender
Email's subject
Email's Date & Time
I succeed creating a code sample that logs in to a gmail account>inbox>all mail list:
import email import imaplib import datetime import email.header username = '[email protected]' password = 'password' mail = imaplib.IMAP4_SSL("imap.gmail.com") mail.login(username, password) mail.select("inbox") result, data = mail.uid('search', None, "ALL") inbox_item_list= data[0].split() inbox_item_listI know a lot of stuff is missing or incorrect but thats what I'm getting from
My starting position.
Any corrections & additions would be very helpful.
Thank you