Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Monday May 29 2017, @10:21AM   Printer-friendly
from the If-only-s/he-provided-an-e-mail-address dept.

Hello! I fairly recently wrote MailTask, an email client that fits my needs better than the ones that had previously existed, and which I hope may be useful to other people as well. I think the program has the potential to be especially useful for other people who have to deal with a lot of email on a day-to-day basis and for power users, a category which I'm sure most of SoylentNews's readership falls into.

Overview:

When you start MailTask, the program puts up a window allowing you to view any of the top-level "folders" recognized by the program. These folders include the INBOX and Sent folders of any IMAP accounts you have the program configured to use, allowing you to view any emails in these folders, and also the "Tasks" folder, which is where the program expects you'll be spending most of your time.

The "Tasks" folder is a list of tasks, not of emails. A task contains a title, any notes-to-self related to the task, any number of unsent draft email messages related to the task, and any number of links to received or already sent email messages related to the task.

General Workflow of MailTask:

First, an email comes in. MailTask puts this message in the appropriate INBOX folder and either attaches this email to an existing task it can tell is related to the received email -- for instance, perhaps the received email is a reply to an email an existing task links to -- or it creates a new one and puts a link to the just-received message in the just-created task. The user looks at the task that has either been created or activated, looks at and possibly revises any notes-to-self, looks through the thread of related messages, composes a draft response to the received message, and sends the response. MailTask at this point will hide the task in question so that it doesn't clutter the view (there's a shortcut that lists you see hidden tasks), but will only make it visible again if new emails come in that are related to it. If an email ever comes in that doesn't need a response, you can manually hide or delete the task that was activated or created. Thus, the "Tasks" folder should ideally only ever contain "stuff you have to deal with and haven't".

Of course, the program is more flexible than that. You can create tasks that aren't related to any emails at all -- like a shopping list, for instance. You can set a task to be related to a meeting. If you do, the meeting will be added to your Google Calendar, the meeting task will go to the top of the task list so you don't miss it, and the meeting task can be used to hold notes for the upcoming meeting, unsent drafts related to the upcoming meeting, and sent/received emails related to the upcoming meeting. You can do a similar thing with tasks that are not meetings but have deadlines of some kind. You can also blacklist a certain sender, so emails from that sender are never added to tasks in the task list unless you do it manually. Alternatively, you can blacklist an entire account, but whitelist particular senders so that emails from them don't get blacklisted just because they were received by the blacklisted account.

The Code:

The code itself is extensible, so, if you're a Python programmer, the sky is the limit. The code related to dealing with incoming emails is all dispatched from a single function in the file mt_scrtry_rn.py. You don't need to know the entire internals of MailTask to add new features to the task handler. I added support for Google Calendar and blacklists/whitelists after the original design was long finished, and the support was easy to add. I also added support for adding a note to a created task stating which class of mine a student is in, based on the sender address of the email, since they almost never tell me. One thing I haven't done yet but know would be very easy to do is an autoreply feature.

A little bit more on the internals. The program itself is actually three related Python scripts. server.py is an IMAP client, and is in charge of syncing the other components with regard to emails that come in and tasks that are changed. client.py is the program that brings up the GUI and that the user interacts with -- it's expected there may be multiple clients running at a time, one on each of the user's computers. mt_scrtry_rn.py is the "utility client" which is in charge of updating the tasks in the task list based on newly received and sent emails. Both client.py and mt_scrtry_rn.py are "clients" in that they need to connect to the server run by server.py over TCP/IP. server.py needs to open two ports for the clients to connect to; the numbers of these two ports are configurable.

The UI:

The user interface is entirely keyboard shortcuts. If you look for the definition of valid_shortcuts in client.py, these shortcuts and their actions should be reasonably self-explanatory. If you have questions, please comment, and I'll answer them.

Installation:

To install the program, you'll need Python 2.7, the FLTK library, pyFLTK, which is a Python binding for the FLTK library. The hardest one of these to get working seems to be pyFLTK. I've successfully run the program on both Linux and MacOS X, and I expect Windows and other UNIXes will also work, but Windows is untested and there could possibly be problems. Comment if you have trouble, tell me what OS you're on, and I'll do my best to help.

Suggestions for improvement are greatly appreciated. I hope you like it! :)


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Monday May 29 2017, @05:00PM

    by Anonymous Coward on Monday May 29 2017, @05:00PM (#517223)

    it's probably not for me, but good job on the license.