Reading mail using python

July 20, 2011 at 3:36 pm Leave a comment

There may be a better way to go about this… however this works without requiring too much code.

* Use imapclient to fetch messages.
* Use fetch to get the full message using ‘BODY[]’
* Parse this with email.parser.Parser
* Use walk to pull out the message part (emails contain multiparts)

Victory.

Advertisements

Entry filed under: Uncategorized. Tags: , , .

Source of the name backus-naur-form Send an attachment from the command line

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


July 2011
M T W T F S S
« Jun   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031

%d bloggers like this: