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: 2) by ledow on Monday May 29 2017, @01:55PM (13 children)

    by ledow (5567) on Monday May 29 2017, @01:55PM (#517134) Homepage

    I'm looking for a replacement for Opera, the old versions of which used to do mail as well as browsing.

    Nothing yet comes close to the simplicity, and the rapid-narrow-search that it can do over nearly 20 years of email archives over dozens of different IMAP/POP3 accounts.

    The problem I have, though, is that there's not even a hint at simplicity here. Servers and clients, python installs, and no screenshot to see the UI? How does it handle HTML email in modern HTML dialects? I'd be better off with Pegasus Mail (which I've tried, but which is definitely still stuck in the 1990's in UI terms).

    The thing that gets me? Opera's mail client is the most boring and simple interface ever. And yet nothing seems able to replicate it.

    I now run Vivaldi for a browser and Opera for a mail client and it's annoyingly disjointed. I long for the days where the two are merged again.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 1, Disagree) by Anonymous Coward on Monday May 29 2017, @03:16PM (4 children)

    by Anonymous Coward on Monday May 29 2017, @03:16PM (#517164)

    screenshots [atlassian.com]

  • (Score: 3, Interesting) by el_oscuro on Monday May 29 2017, @04:30PM

    by el_oscuro (1711) on Monday May 29 2017, @04:30PM (#517202)

    Just looking at the code at https://github.com/linuxrocks123/MailTask/blob/master/html2text.py [github.com]

    It looks like it converts html to markdown style text. Probably more secure too as most phishing schemes rely on hyperlink abuse.

    --
    SoylentNews is Bacon! [nueskes.com]
  • (Score: 2) by linuxrocks123 on Monday May 29 2017, @04:43PM

    by linuxrocks123 (2557) on Monday May 29 2017, @04:43PM (#517211) Journal

    ledow,

    The install could be simpler, but I think the actual day-to-day usage of the program is pretty simple. I'll be posting screenshots of the UI in a bit -- this is complicated by the fact I don't really want to publicly post my inbox to the Internet -- but I can assure you it's very no-frills.

    HTML email is handled through html2text, a very nice library written by the late Aaron Swartz.

  • (Score: 0) by Anonymous Coward on Monday May 29 2017, @07:16PM

    by Anonymous Coward on Monday May 29 2017, @07:16PM (#517279)

    Sorry to be AC- I have a login but I'm weary of the low-life personal attacks here on SN.

    I'm still using Old Opera for all pop3 email (the bulk of my email) and most browsing, and Vivaldi (with lots of blockers / privacy extensions) when / where I'm forced to. I don't mind the "lack of integration" - I'm not sure what that means anyway. In the rare case that I want to send an email to an address on a Vivaldi-rendered webpage, I just right-click the link, copy, and paste it into Opera mailer. I'm sure I could tell Windows I want Opera to be my mailer, but I don't trust Windows with that kind of information (all that "integration" seems to be the mechanism of much malware).

    I keep thinking I need to migrate to Thunderbird but I fear things breaking, code bloat, and Opera mail ain't broke so why fix it?

  • (Score: 2) by ledow on Monday May 29 2017, @07:58PM (4 children)

    by ledow (5567) on Monday May 29 2017, @07:58PM (#517292) Homepage

    Thanks for the replies, all the below.

    Sorry, but this is just not going to be for me. The screenshot looks worse than some of the prototype mail clients I knocked up for personal use to test library functionalities 15 years ago.

    And if it can't render HTML, pretty much that's ludicrous in this day and age (security is quite easy in HTML email - don't load scripts, and pretty much you're done - HTML/CSS has a purpose in a formatted, non-interactive message, Javascript does not).

    Don't get me wrong, I've spent years with Linux on desktop and servers, I've even collected email over "telnet" when it's been necessary. A UI is certainly not the thing for some jobs and nothing REQUIRES a UI.
      But in the modern era, a mail client that can't render formatted email and doesn't have a useful UI is really just a development project.

    Even the "big-name" mail clients that are decades along can feel unworkable because of missing features or UI elements. Something like this is just a glorified newsreader from the 90's.

    But I would pay through the nose for a proper mail client, even an open-source one. None of the ones you've ever heard of (whether ThunderBird, Pegasus or Outlook) are as workable as a three-pane Opera instance with IMAP/POP3 accounts.

    • (Score: 0) by Anonymous Coward on Tuesday May 30 2017, @12:39AM

      by Anonymous Coward on Tuesday May 30 2017, @12:39AM (#517398)

      I don't have html mail enabled on just about everything.

      What ads are you deliberately reading that you get in mail?

      That is the entire reason I don't use HTML in my email client. I also have HTML mail rendering disabled on my phone; I can't block pixel retrieval over the cell network and so I don't want to worry about such marketing/tracking.

      Most emails that use HTML are fairly readable unless it's got a zillion constant contact or whatever marketing tracking links integrated. I can't really imagine what you need in email that is best served via a web page.

    • (Score: 3, Insightful) by boltronics on Tuesday May 30 2017, @03:45AM

      by boltronics (580) on Tuesday May 30 2017, @03:45AM (#517446) Homepage Journal

      I currently use Mutt, and have been for years. I'll give this program a look, although I'll be hard-pressed to switch (I'd probably be using Emacs for e-mail by now if I were going to).

      If you need HTML just to read e-mail, you're doing it wrong (or at least, the people sending e-mail to you are).

      --
      It's GNU/Linux dammit!
    • (Score: 2) by linuxrocks123 on Tuesday May 30 2017, @03:53PM (1 child)

      by linuxrocks123 (2557) on Tuesday May 30 2017, @03:53PM (#517698) Journal

      ledow,

      I'm a little surprised to get criticism of the UI from this site. I agree it's not a piece of art, but I can assure the UI is more than functional, and I think that's the most important thing. Honestly, what the UI needs more than anything is a few more keyboard shortcuts. I find myself often doing repetitive click sequences to go into a task and look at the sole Related message it was created to link to. A few Ctrl-key sequences to handle that would be better. Maybe one day soon, when it finally annoys me enough and I have time to do something about it because it's summer, I may add some sequences to deal with that annoyance. Regarding the HTML email thing, it does render HTML email; it just renders it as MarkDown text using the html2text library.

      But, hey, if you're happy with your current setup, that's the main thing. I will say that MailTask isn't a traditional email client, so stuff like a pretty UI, tabs, etc., are not where I put my focus. I wrote MailTask not because I thought Thunderbird and the rest were bad per se, but rather because I needed more management, organization, and filing capabilities than just custom IMAP folders and filters. Organizing related emails together and merging them into tasks (or "action items" I guess) is what I personally get out of MailTask that I couldn't get out of other email clients.

      • (Score: 2) by linuxrocks123 on Tuesday May 30 2017, @04:11PM

        by linuxrocks123 (2557) on Tuesday May 30 2017, @04:11PM (#517716) Journal

        Additionally, here's what I think of HTML email (from line 1336 of client.py):


        #VILE CREATURE, THOU DURST CALL UPON ME?
        #WALK NO MORE, PERVERSION OF NATURE!
        if body.get_content_type()=="text/html":
                payload = mt_attache.text_html(body,mt_attache.FLTK_ENCODING)
        else:
                payload = mt_attache.text_plain(body,mt_attache.FLTK_ENCODING)