skip to navigation
skip to content

Not Logged In

pymmails py3.3-v0.1.517

Three functionalities: folder synchronization, a logging function, helpers to generate documentatino with sphinx

Latest Version: 0.2.81

Contents

Introduction

The module was started to grab emails using IMAP and to store them on a local disk. The documentation is available at pymmails documentation. You can download the setup here. The module is available on pypi/pymmails and on GitHub/pymmails. It requires module pyensae and pyquickhelper. The main functionality is the ability to download your email from your inbox and to store them in a local folder with their attachements:

from pyquickhelper import fLOG
from pymmails import MailBoxImap
fLOG(OutputPrint=True)
user = "your.email"
pwd = "passsword"
server = "imap.your_provider.ext"
box = MailBoxImap(user, pwd, server)
box.login()
box.dump_html(folder=os.path.abspath(r"folder_destination"))
box.logout()

A parameter pattern can be added to look for a subset of emails:

...
box.dump_html(folder=os.path.abspath(r"folder_destination"),
            pattern='FROM "xavier"')
...

Below, some examples of patterns:

pattern='FROM "xavier" SINCE 1-Feb-2013'
pattern='FROM "xavier" SINCE 1-Feb-2013 BEFORE 5-May-2013'
pattern='FROM "xavier" SINCE 1-Feb-2013 BEFORE 5-May-2013 UNANSWERED'
pattern='CC "jacques" FROM "xavier" DELETED'
pattern='TEXT "github"'
pattern='LARGER 10000 SMALLER 1000000'
pattern='SUBJECT "programmation"'
pattern='TO "student" FLAGGED'
pattern='UNSEEN'

Design

This project contains various helper about logging functions, unit tests and help generation.
  • a source folder: src
  • a unit test folder: _unittests, go to this folder and run run_unittests.py
  • a _doc folder: _doc, it will contains the documentation
  • a file setup.py to build and to install the module
  • a file make_help.py to build the sphinx documentation
 
File Type Py Version Uploaded on Size
pymmails-py3.3-v0.1.517.zip (md5) Source 2014-01-22 14KB
  • Downloads (All Versions):
  • 3 downloads in the last day
  • 123 downloads in the last week
  • 1316 downloads in the last month