This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tom de wulf
Recipients barry, r.david.murray, tom de wulf
Date 2017-11-17.14:12:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510927927.93.0.213398074469.issue32058@psf.upfronthosting.co.za>
In-reply-to
Content
I do get this data from an IMAP fetch statement, see my code below:

    rv, data = imap.fetch(num, "(BODY[HEADER.FIELDS (FROM SUBJECT)])")
    if rv != 'OK':
        logging.error("Error getting message sender and subject (" + num.decode("ascii") + ")")
        return
    logging.info("Got message " + num.decode("ascii"))

    sender_subject = data[0][1].decode("utf-8")
    sender = email.utils.parseaddr(sender_subject.replace('[', '').replace(']',''))[1].replace("\r\n", "")

Thank you for providing this new API though, I will make sure to switch to that.
History
Date User Action Args
2017-11-17 14:12:07tom de wulfsetrecipients: + tom de wulf, barry, r.david.murray
2017-11-17 14:12:07tom de wulfsetmessageid: <1510927927.93.0.213398074469.issue32058@psf.upfronthosting.co.za>
2017-11-17 14:12:07tom de wulflinkissue32058 messages
2017-11-17 14:12:07tom de wulfcreate