Skip to content
Advertisement

Tag: imaplib

How to search for email where the subject contains numbers

I’m looking for emails where the title has information on how many Bitcoin I received, but as there’s a number in the email title, I want a way to find emails where the number is equal to or greater than that number. Example… I have an email title like “You received 0.000666703 BTC” but I want to search if the

Parse multipart/related emails

I’m trying to parse emails and convert tables within them into pandas dataframes. Since some of the emails are multipart, I took some code from this answer. The following code works fine but it breaks with multipart/related emails (no tables are found). Here’s the header of one of the multipart/related emails: Any ideas? Thanks Answer you want to parse text/html

imaplib “command SELECT illegal in state NONAUTH” error

I’m attempting to create an application to retrieve and analyse emails sent through gmail. I’m using an alteration on the tutorial found here; http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ readmail.py When I run this code through the command line the output is as expected, however when ran through a basic flask import the entire thing falls apart. app.py The error I receive is; I’ve made

Advertisement