Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3f1d4c

Browse files
committed
modify default imap server on reading emails tutorial
1 parent0a1850a commita3f1d4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎python-standard-library/reading-email-messages/reading_emails.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
# account credentials
88
username="youremailaddress@provider.com"
99
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"
1014

1115

1216
defclean(text):
@@ -17,7 +21,7 @@ def clean(text):
1721
N=3
1822

1923
# 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)
2125
# authenticate
2226
imap.login(username,password)
2327

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp