Menu

#728 Drag-n-drop from thunderbird : simpler would be more robust.

Release_1.0.5
closed
Linux (158)
linux
5
2025-12-27
2010-06-23
No

Hello,

Thank you for this interesting tool.

  • Software environment

Ubuntu Linux 10.04
Thunderbird 3.0.4
Taskcoach 1.0.5

  • Description of problem

When dragging an e-mail from thunderbird to taskcoach,
1) a box opens asking password (wt. ?)
2) it mentions some user@domain which does not even exist

  • Extra information

The user@domain happens to be obsolete information from the first test I made using this thunderbird. The actual login/server combination is not stored in the fields you picked when sneaking at thunderbird profile. Anyway, I don't want to type my IMAP password each time I drag-n-drop.

From other bug reports seen here, it seems you have chosen to resort to hacks (parsing thunderbird's preferences, hoping that they are up-to-date, trying to interpret the message-id, connect yourself to imap server etc.) and wild guesses (where is thunderbird's profile dir, which profile in it, which fields) to access e-mail content, etc...

  • Observed behavior

This is complicated and fragile:
-path to thunderbird profile may be non-standard
-profile may be just changed and not saved yet
-thunderbird and taskcoach may even be on different hosts which do not share a filesystem (this actually happened to me today when trying to reproduce one other bug on taskcoach to test with a different version on a different machine).
-thunderbird contains some workaround and extra setup to support many imap servers and their quirks. When accessing IMAP yourself, either you have to reproduce this filthy work or the process is bound to be fragile.

  • Suggested behavior

There must be a simpler, leaner approach. Let's go back to basics.
User drags an e-mail to have a reminder about this e-mail, like "I have to reply to this within x days".

The central question is : does taskcoach really need to access e-mail details ?

What thunderbird provides through drag-n-drop is probably a message-uid or the like.
It may be sufficient to store this message reference in the task.

Later when viewing the task, the user want to see the e-mail. Taskcoach issues something like
thunderbird -mail "imap://login@server.blabla.com:143/fetch%3EUID%3E.INBOX%3E31846"

This option does not allow to fill fields, but you have the message reference, which is basically what you needed to have thunderbird open the e-mail at fill.

It's a step toward something cleaner : removes dependency on clumsily finding/parsing private config files, asking passwords, etc. Granted, you still need to launch a thunderbird executable, but that's something you can rely upon as it is a common hypothesis and can be customized through preferences.

It may make sens to keep the current way to retrieve e-mail info but make it optional, like e.g. in preferences: "when dragging from thunderbird, (*) fetch e-mail details and fill task fields or ( ) only store reference in task".

  • Conclusion

With current state, the killer feature I was expecting (drag-n-drop from thunderbird) does not work as expected.

Questions:
1) is it planned behavior to have to type IMAP password each time one does drag-n-drop ?
2) What's your opinion on "does taskcoach really need to access e-mail details ?"

Thank you for your attention.

Discussion

  • Stéphane Gourichon

    Hi again,

    In current state of taskcoach,
    after creating a task from an e-mail,
    later when opening the task,
    can taskcoach open the attached e-mail in thunderbird at all ?

    Thank you.

     
  • Frank Niessink

    Frank Niessink - 2010-06-27

    Jérôme, what do you think about this proposal?

    Thanks, Frank

     
  • Jérome Laheurte

    DnD from Thunderbird is indeed hackish. Storing only the mail's ID is what we do for Mail.app, because Mac OS X supports a URL scheme that allows to use it to open the mail. Unfortunately, the internal ID used by Thunderbird for DnD was never intended to be used by a third party app; AFAIK, there is no way to tell Thunderbird to open the associated e-mail. It doesn't even uniquely identify an e-mail if you have several profiles...

     
  • Stéphane Gourichon

    Hi and thank you for reading that precise (but long) bug report.

    Unfortunately, the internal ID used by Thunderbird for DnD was never
    intended to be used by a third party app;

    I suspected this, too.
    I observed that asking thunderbird for properties of IMAP-based folders showed that unexisting user@domain, too. It looks like thunderbird uses this (arguably arbitrary) string to identify the account /as known in this profile/, not the imap user@server (even if in many cases it corresponds to a real IMAP login).

    In other words, the IS send via drag-n-drop looks like a URL but is not, and breaks as soon as the current user or server was changed from the one used at account creation.
    So, trying to rely on that ID only is kind-of doomed. :-(

    AFAIK, there is no way to tell Thunderbird to open the associated
    e-mail.

    The following command line (think usual fork+exec) works for me. Were you thinking of something else ?

    thunderbird -mail "imap://login@server.blabla.com:143/fetch%3EUID%3E.INBOX%3E31846"

    It doesn't even uniquely identify an e-mail if you have several
    profiles...

    I think I see what you mean. Were you thinking of a scenario like below ?

    User runs thunderbird on a fresh account.
    User creates IMAP account for user1@foo.
    User changes IMAP login too user2 and server to bar.
    User logins to this IMAP account (really user2@bar), creates folder baz and inserts one e-mail, say "Message-ID: toto".
    Thunderbird associates this ID with the e-mail: "imap://user1@foo:143/fetch%3EUID%3E.BAZ%3E1"
    User drags e-mail to taskcoach.
    User quits thunderbird.

    User launches thunderbird with profile manager, creates profile "two".
    User creates IMAP account for user1@foo.
    User logins to this IMAP account (really user1@foo), creates folder baz and inserts one e-mail, say "Message-ID: tata"
    Thunderbird associates this ID with the e-mail: "imap://user1@foo:143/fetch%3EUID%3E.BAZ%3E1"

    Problem:
    when the following command line is run:
    thunderbird -mail "imap://user1@foo:143/fetch%3EUID%3E.BAZ%3E1"
    depending on the profile being run, Thunderbird will open one e-mail or the other.
    If thunderbird is not already running, it will open the default profile or even ask the profile to run before showing either message.

    Trying
    thunderbird -P "default" -mail "imap://user1@foo:143/fetch%3EUID%3E.BAZ%3E1"
    thunderbird -P "two" -mail "imap://user1@foo:143/fetch%3EUID%3E.BAZ%3E1"

    This solves the problem only if:
    -the profile is known
    -thunderbird is not already running.

    Two reasons make this not satisfying:

    1) On drag-n-drop, Thunderbird does not tell which profile is being run (you wrote this in an earlier bug comment), so taskcoach cannot know.
    2) If thunderbird is running the wrong profile, it will ignore the "-P" argument and open the wrong e-mail.

    Questions:
    -Were you thinking of such a scenario ?
    -Other questions in previous comments

    I may have suggestions for solutions but it depends on what you think.

    Regards,

     
  • Jérome Laheurte

    Indeed, the user changing profile is a problem we already encountered. I just noticed that Thunderbird 3 does use an ID that it can open later using the -mail option; I don't know if it's profile-safe though, I'll have to experiment a bit. That's new in Thunderbird 3.

    Now the problem is that if I change the way it behaves, some users will be at loss; on the other hand the current behaviour is totally flawed.

    The only thing that bugs me is that we won't be able to store the e-mail in the task file anymore; so users switching computers (say if they run Task Coach from a USB key) won't be able to open e-mail attachments on any computer. This is already the case with Mail.app though.

     
  • Jérome Laheurte

    BTW, in the IMAP case, Task Coach should only ask for the password once per session; it caches it in memory upon successfull authentication.

     
  • Stéphane Gourichon

    Hi,

    In current state of taskcoach,
    after creating a task from an e-mail,
    later when opening the task,
    can taskcoach open the attached e-mail in thunderbird at all ?

    I tried, the result was surprising.

    -Ubuntu 10.04
    -using gnome desktop
    -in gnome settings, preferred application for e-mail: thunderbird

    Machine happens to also have kdepim installed (installed as possible alternative to taskcoach).

    No kde application started since machine boot.

    I opened thunderbird,
    put an e-mail in a local folder,
    from local folder, drop onto taskcoach.

    Taskcoach remained stuck for about 20 seconds then created an entry.
    I opened the entry, looked for attachments, tried to open the attachment.

    ...The attachment opened in kmail.
    That's unexpected.

     
  • Jérome Laheurte

    Seems like Ubuntu 10 uses kmail as the default handler for .eml files when kdepim is installed. Anyway, the next version of Task Coach will have support for Thunderbird 3 by default, using the same approach as Mail.app, that is, to store the mail's ID instead of its content and open if with Thunderbird instead of the system's .eml handler.

     
  • Stéphane Gourichon

    Thank you for you reply. I guess the change you mentioned will close this bug. Regards.

     
  • Aaron Wolf

    Aaron Wolf - 2025-12-27
    • status: open --> closed
    • Operating system: --> linux
     
  • Aaron Wolf

    Aaron Wolf - 2025-12-27

    Hi, it's many years later, and as I close this old outdated ticket, I'm excited to tell you that https://github.com/taskcoach/taskcoach now has updated Python3 Task Coach codebase! Packages are available for some common Linux systems and we can add more.

    We'd love to have you test the updated program

    Drag and drop from Thunderbird doesn't work any more, but if you want to advocate for bringing it back or help update or test etc, we're hoping to get development progress back on track

    Cheers

     

Log in to post a comment.