0
我正在寻找打印单个电子邮件的主题,该电子邮件的UID已使用Python 2.7 imap库。这很简单,我是Python的新手,并且在使用库时遇到问题。如何使用uid打印单个电子邮件的主题
这是我有:
# Retrieve and store ID & UID for most recent email received
result, data = mail.search(None,'ALL') # search and return sequential ids
latest_id = data[0].split()[-1]
result, data = mail.uid('search', None, "ALL") # search and return uids instead
latest_uid = data[0].split()[-1]
现在我只是希望打印由latest_uid
标识的电子邮件的主题。
感谢您的帮助!
太棒了!完美的作品。谢谢! – McFizz