Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用imap-tools库,尝试访问 message.reply_to 时出现以下错误:
“MailMessage”对象没有属性“reply_to”
有任何想法吗 ?
谢谢
我添加了reply_to。更新库版本。
(imap_tools 作者)
最后我找到了一个解决方案:
pattern = "^[^<]+<([^>]+).*" search = re.search(pattern, str(msg.obj['Reply-To'])) if search: reply_to = search.group(1) else: reply_to = ''