{ "info": { "author": "Martin Rusev", "author_email": "martinrusev@live.com", "bugtrack_url": null, "classifiers": [], "description": "Mailbox - Python IMAP for Humans\n=======\n\nPython library for reading IMAP mailboxes and converting the email content to human readable data\n\nInstallation\n============\n\n\tpip install mailbox\n\n\nor \n\n\tgit clone git@github.com:martinrusev/mailbox.git\n\tpython setup.py install\n\n\nUsage \n=====\n\n\n\tfrom mailbox import MailBox\n\n\tmailbox = MailBox('imap.gmail.com',\n\t\t\t\t username='username', \n\t\t\t\t password='password',\n\t\t\t\t ssl=True)\n\t\n\t# Gets all messages \n\tall_messages = mailbox.messages()\n\t\n\t# Unread messages \n\tunread_messages = mailbox.messages(unread=True)\n\n\n\tfor message in all_messages:\n\t\t........\n\t# Every message is an object with the following keys\n\t\t\n\t\tmessage.sent_from\n\t\tmessage.sent_to\n\t\tmessage.subject\n\t\tmessage.headers\n\t\tmessage.message-id\n\t\tmessage.date\n\t\tmessage.text_body\n\n\t# To check all available keys\n\t\tprint message.keys()\n\n\t\n\t# To check the whole object, just write\n\n\t\tprint message\n\n\t\t{\n\t\t'headers': \n\t\t\t[{\n\t\t\t\t'Name': 'Received-SPF',\n\t\t\t\t'Value': 'pass (google.com: domain of ......;'\n\t\t\t}, \n\t\t\t{\n\t\t\t\t'Name': 'MIME-Version',\n\t\t\t\t'Value': '1.0'\n\t\t\t}],\n\t\t'text_body': ['ASCII'],\n\t\t'date': u 'Fri, 26 Jul 2013 10:56:26 +0300',\n\t\t'message-id': u '51F22BAA.1040606',\n\t\t'sent_from': [{\n\t\t\t'name': u 'Martin Rusev',\n\t\t\t'email': 'martin@amon.cx'\n\t\t}],\n\t\t'sent_to': [{\n\t\t\t'name': u 'John Doe',\n\t\t\t'email': 'john@gmail.com'\n\t\t}],\n\t\t'subject': u 'Hello John, How are you today'\n\t\t}\n\nTODO\n======\n\n- Replace the dictionaries with objects and generators\n- Add logging and exceptions \n- Implement smarter header parsing", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/martinrusev/mailbox", "keywords": "email,IMAP,parsing emails", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "mailbox", "package_url": "https://pypi.org/project/mailbox/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mailbox/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/martinrusev/mailbox" }, "release_url": "https://pypi.org/project/mailbox/0.4/", "requires_dist": null, "requires_python": null, "summary": "Python IMAP for Humans", "version": "0.4" }, "last_serial": 825506, "releases": { "0.3.2": [], "0.3.3": [], "0.4": [ { "comment_text": "", "digests": { "md5": "af1fdca43ab5eedb37e1efad125004d6", "sha256": "f9bf9679932f7a245902d33924dff11485bcf49cac0526f1a5eb9550bc510d73" }, "downloads": -1, "filename": "mailbox-0.4.tar.gz", "has_sig": false, "md5_digest": "af1fdca43ab5eedb37e1efad125004d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4116, "upload_time": "2013-07-26T12:22:53", "url": "https://files.pythonhosted.org/packages/8d/8c/a5fc222a2fc8a915b572b14a59b7939f08b011f7f2118f61a3fd15cc0655/mailbox-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "af1fdca43ab5eedb37e1efad125004d6", "sha256": "f9bf9679932f7a245902d33924dff11485bcf49cac0526f1a5eb9550bc510d73" }, "downloads": -1, "filename": "mailbox-0.4.tar.gz", "has_sig": false, "md5_digest": "af1fdca43ab5eedb37e1efad125004d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4116, "upload_time": "2013-07-26T12:22:53", "url": "https://files.pythonhosted.org/packages/8d/8c/a5fc222a2fc8a915b572b14a59b7939f08b011f7f2118f61a3fd15cc0655/mailbox-0.4.tar.gz" } ] }