-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEMAILCHECKERVERIFIERFILTERING.py
More file actions
83 lines (77 loc) · 2.56 KB
/
EMAILCHECKERVERIFIERFILTERING.py
File metadata and controls
83 lines (77 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
from tqdm import tqdm
from time import sleep
import imaplib
def progress(listofmessages):
for i in tqdm(listofmessages, desc ="Progress : "):
sleep(.1)
mail = imaplib.IMAP4_SSL('imap.gmail.com',993)
address = 'email@gmail.com'
mypassword = 'password'
mail.login(address, mypassword)
def Inbox():
mail.select('Inbox')
typ,messageIds = mail.search(None,"UNSEEN")
messageIdsString = str(messageIds[0],encoding='utf-8')
listofmessages = messageIdsString.split(" ")
nbr = len(listofmessages)
if len(listofmessages)== 0:
progress(listofmessages)
print("You Have No Mails On Inbox")
elif len(listofmessages)== 0:
progress(listofmessages)
print("You Have No Mails On Inbox")
else :
progress(listofmessages)
print("You Have ",nbr,"New Emails Inbox")
def Spam():
mail.select('[Gmail]/Spam')
typ,messageIds = mail.search(None,"UNSEEN")
messageIdsString = str(messageIds[0],encoding='utf-8')
listofmessages = messageIdsString.split(" ")
nbr = len(listofmessages)
if len(listofmessages)== 0:
progress(listofmessages)
print("You Have No Mails On Spam")
elif len(listofmessages)== 0:
progress(listofmessages)
print("You Have No Mails On Spam")
else :
progress(listofmessages)
print("You Have ",nbr,"New Emails Spam")
def Sent():
mail.select('"[Gmail]/Messages envoy&AOk-s"')
typ,messageIds = mail.search(None,"SEEN")
messageIdsString = str(messageIds[0],encoding='utf-8')
listofmessages = messageIdsString.split(" ")
nbr = len(listofmessages)
if len(listofmessages)== 0:
progress(listofmessages)
print("You Have Sent No Email")
else :
progress(listofmessages)
print("You Have Sent ",nbr,"Emails")
print("Welcome to E-mail Checker !!")
def checking():
print("what Are you planning To Check ? ")
print("Here is the List : ")
print("I : Inbox")
print("S : Spam")
print("E : Sent")
an = input("Enter here : ")
answer = an.lower()
print("We've Got your Answer Please Hold on !")
if answer == 'i':
Inbox()
elif answer == 's':
Spam()
elif answer == 'e':
Sent()
checking()
an = input("Still wanna Check (press any key) : ")
answer = an.lower()
while(answer != 'n'):
checking()
print("Thank You For Using Our Program Want To Check Again ?")
print('Y for yes / N for no')
answer = input()
print('Hope you enjoyed our Program See You Next Time ')