Creating a Draft message in Gmail using the imaplib in Python
问题 I want to write a python module that sends data to a draft message in a G-mail account. I have written a script about two weeks ago that worked perfectly using imaplib. A simplified example of my module is below. (I have created a test email address for anyone to test this script on.) import imaplib import time conn = imaplib.IMAP4_SSL('imap.gmail.com', port = 993) conn.login('testpythoncreatedraft@gmail.com', '123456aaa') conn.select('[Gmail]/Drafts') conn.append("[Gmail]/Drafts", '',