时间:2021-07-01 10:21:17 帮助过:114人阅读
import imaplib mailserver = imaplib.IMAP4_SSL('imap.gmail.com', 993) username = 'gmailusername' password = 'gmailpassword' mailserver.login(username, password) status, count = mailserver.select('Inbox') status, data = mailserver.fetch(count[0], '(UID BODY[TEXT])') print data[0][1] mailserver.close() mailserver.logout()
希望本文所述对大家的Python程序设计有所帮助。