How to make a GUI email in python

Pymail

PyMailGui 1.0 – A Python/Tkinter email client.
Early version without threads for wait states.Adds a simple Tkinter GUI interface to the pymail script’s functionality. While works for POP/SMTP based email accounts using sockets on the machine.
Two main reasons to like this script:

  1. It’s scriptable–you control its evolution from this point forward, and can easily customize and program it by editing the Python code in this file, unlike canned products like MS-Outlook.
  2. It’s portable–this script can be used to process your email on any machine with internet sockets where Python and Tkinter are installed; use the simple command-line based pymail.py if  you have sockets and Python but not Tkinter.
    E.g., I use this to read my pop email account from UNIX machines when I’m away from home PC.
    Note: only fetches new mail on ‘Load’ button and assumes nothing else is changing the pop
    mailbox while the gui is running (ex: deletes).

As you can see from the below images, there are lots of features available:

Image of pymail

There is much room for improvement and new features here–left as exercises. Example extensions:
– And you must add an automatic spam filter, which matches from  hdrs etc. with a regex and auto deletes matching messages as they are being downloaded.
– Do attachments: auto decoding/unpacking for multi-part emails, etc.: see decode*.py here and module mimetools for attachment hints
– Make me a class to avoid global vars, and make it easier to attach this GUI to another one
that would also allow creation of more than one mail client gui per process, but this won’t work as currently designed (deletes in one gui can invalidate others, due to new pop msg numbers)
– Inherit from GuiMaker here to get menu/toolbars.
– And handle wait states better (e.g., use threads) and, calling win.update() from a thread every And secs using time.sleep fails on Windows today need to call update() sometime during load/send.

Things you need to install to run this project:
  1. You must install python 2.7 or python 3.
  2. And you must install python libraries like: rfc822, StringIO, string, sys, Tkinter, tkFileDialog, and tkMessageBox.

And finally, click on below button to install this project.
Download
Thank you,

Leave a Reply

Your email address will not be published. Required fields are marked *