Martin Rusev a790fd4cd2 Manifest file
2013-07-23 19:25:06 +03:00
2013-07-23 15:13:32 +03:00
2013-07-23 12:01:59 +03:00
2013-07-22 04:40:29 -07:00
2013-07-23 19:25:06 +03:00
2013-07-23 15:20:05 +03:00
2013-07-23 19:25:06 +03:00

Mailbox - IMAP for humans

Python library for reading IMAP mailboxes and converting the email content to human readable data

Installation

pip install mailbox

Usage

from mailbox import MailBox

mailbox = MailBox('imap.gmail.com',
			  username='username', 
			  password='password',
			  ssl=True)


# Gets all unread messages
unread_messages = mailbox.get_unread()

# Gets all messages 
all_messages = mailbox.get_all()


for message in all_messages:
	........

# Every message is converted to a dictionary with the following keys:

{
	'MesssageID': '22c74902-a0c1-4511-804f2-341342852c90',
	'From': {
		'Name': 'John Doe',
		'Email': 'jonhdoe@email.com'
	},
	'To': {
		'Name': 'Martin Rusev',
		'Email': 'martin@amon.cx'
	},
	'Date': 'Mon, 22 Jul 2013 23:21:39 +0000 (UTC)',
	'TextBody': ['ASCII'],
	'Subject': 'This is a message'

	'Headers': [{
		'Name': 'Received-SPF',
		'Value': 'pass (google.com: domain of bounces+......;'
	}, {
		'Name': 'MIME-Version',
		'Value': '1.0'
	}],
	
}
Description
Python IMAP for Human beings
Readme 326 KiB
Languages
Python 97.5%
omnetpp-msg 2.1%
Makefile 0.4%