We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a1850a commit a3f1d4cCopy full SHA for a3f1d4c
python-standard-library/reading-email-messages/reading_emails.py
@@ -7,6 +7,10 @@
7
# account credentials
8
username = "youremailaddress@provider.com"
9
password = "yourpassword"
10
+# use your email provider's IMAP server, you can look for your provider's IMAP server on Google
11
+# or check this page: https://www.systoolsgroup.com/imap/
12
+# for office 365, it's this:
13
+imap_server = "outlook.office365.com"
14
15
16
def clean(text):
@@ -17,7 +21,7 @@ def clean(text):
17
21
N = 3
18
22
19
23
# create an IMAP4 class with SSL, use your email provider's IMAP server
20
-imap = imaplib.IMAP4_SSL("imap.gmail.com")
24
+imap = imaplib.IMAP4_SSL(imap_server)
25
# authenticate
26
imap.login(username, password)
27
0 commit comments