我之所以贴出与这个问题密切相关的东西,是因为我尝试过使用这个问题的答案,我尝试过改变事物,我搜索过谷歌,并且坚持不懈地与这个问题纠缠了大约5个小时,我愿意花更多的时间在这个问题上
--我只是想你们中的一个可能会有答案:)
我的问题如下,我试图将一封邮件从我的gmail转发到另一个gmail,在运行尽可能多的python脚本来尝试这个简单的任务时,我仍然无法理解它。在
以下是我正在运行的代码(这是我对以其他形式发布的内容的修改版本):import smtplib, imaplib, email, string
imap_host = "imap.gmail.com"
imap_port = 993
smtp_host = "smtp.gmail.com"
smtp_port = 587
user = "John.Michael.Dorian.4"
passwd = "mypassword"
msgid = 1
from_addr = "[email protected]"
to_addr = "[email protected]"
# open IMAP connection and fetch message with id msgid
# store message data in email_data
client = imaplib.IMAP4_SSL(imap_host, imap_port)
client.login(user, passwd