这就是我所在的地方,但我不确定从哪里开始:
(low..high-1).each do |j|
答案 0 :(得分:0)
我已经在gmx下对其进行了测试并且有效,请查看https://docs.python.org/3/library/email.html和https://docs.python.org/3/library/imaplib.html
import imaplib
import email
mail = imaplib.IMAP4_SSL('imap')
mail.login('username', 'password')
status, messages = mail.select('INBOX')
if status != "OK": exit("Incorrect mail box")
for i in range(1, int(messages[0])):
res, msg = mail.fetch(str(i), '(RFC822)')
for response in msg:
if isinstance(response, tuple):
msg = email.message_from_bytes(response[1])
print (msg["subject"])