Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mail Link Issues on Windows #13

Open
CedricCourson opened this issue Dec 3, 2021 · 24 comments
Open

Mail Link Issues on Windows #13

CedricCourson opened this issue Dec 3, 2021 · 24 comments
Labels
bug Something isn't working

Comments

@CedricCourson
Copy link

Hello
Thank you for your developpement !
But the mail-link dosnt work on windows ...
The app create a task with a link. But ba clicking on the link on todoist, windows is not able to open the link. I tried your code on powershell but it doesn't work....
Thank you

@kteevee
Copy link

kteevee commented Dec 7, 2021

I had the same problem and was able to get it working by creating a register entry like this

== BEGIN .REG FILE ===

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\imap-message]
"URL Protocol"=""

[HKEY_CLASSES_ROOT\imap-message\shell]

[HKEY_CLASSES_ROOT\imap-message\shell\open]

[HKEY_CLASSES_ROOT\imap-message\shell\open\command]
@=""C:\Program Files (x86)\Mozilla Thunderbird\Thunderbird.exe" -mail "%1""

== END .REG FILE ===

@DudeThatsErin
Copy link

I'm not sure how to create a registry file.

@kteevee
Copy link

kteevee commented Jan 8, 2022

@GOHEIGO
Copy link

GOHEIGO commented Feb 1, 2022

I have installed 64bit thunderbird and changed the path - but its still not working for me.
Error: App association missing. Any suggestion?

@lugiii93
Copy link

lugiii93 commented Feb 6, 2022

@SmBe19
You did a misstake. The default string value (imap-message > shell > open > command) must be "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" -mail "%1". Than it is working fine!

@lugiii93
Copy link

lugiii93 commented Feb 6, 2022

I had the same problem and was able to get it working by creating a register entry like this

== BEGIN .REG FILE ===

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\imap-message] "URL Protocol"=""

[HKEY_CLASSES_ROOT\imap-message\shell]

[HKEY_CLASSES_ROOT\imap-message\shell\open]

[HKEY_CLASSES_ROOT\imap-message\shell\open\command] @=""C:\Program Files (x86)\Mozilla Thunderbird\Thunderbird.exe" -mail "%1""

== END .REG FILE ===

That is absoulutly right, but i have seen that it does not working fine. The default string value at command will not be set. I have no idea why.

@SmBe19 SmBe19 added the bug Something isn't working label Feb 6, 2022
@SmBe19 SmBe19 changed the title mail link Mail Link Issues on Windows Feb 6, 2022
@SmBe19
Copy link
Owner

SmBe19 commented Feb 6, 2022

Hey everyone, thanks for posting possible solutions and helping each other out. Unfortunately, I currently do not have a Windows machine on which I can test this, so I can't really debug this. I have now fixed the mistake which @lugiii93 pointed out (thanks!), maybe this fixes it.

I'll leave this issue open to collect and discuss any further problems appearing on Windows.

@lugiii93
Copy link

lugiii93 commented Feb 6, 2022

@SmBe19
You must change all \" into only a ". Than it is absolutely right and does working fine.

@SmBe19
Copy link
Owner

SmBe19 commented Feb 6, 2022

@lugiii93
Oh, yeah, missed that one. Thanks for pointing it out, makes sense.

@lugiii93
Copy link

lugiii93 commented Feb 6, 2022

I have uploaded a powershell file for all users they are not have powershell knowledge. The content of the file can be viewed before in a text editor. By doing a right click the file can run with powershell. So everything is 100% secure.
https://www.file-upload.net/download-14845373/URLThunderbirdTodoistLinks.ps1.html

/edit
On many Windows Systems it is not allowed to run scripts. Because of that i have uploaded a new file (for all users they are not have registry or powershell knowledge) to add all necessary strings directly into registry.

The content of the file can also be viewed before in a text editor by clicking the right mouse button. So everything is 100% secure.

https://www.file-upload.net/download-14849504/ThunderbirdMailLinksintoRegistry.reg.html


@kteevee
I have found the misstake. It must be @="\"C:\\Program Files (x86)\\Mozilla Thunderbird\\thunderbird.exe\" -mail \"%1\"". Than it is set correctly into command.

@dionsternberg
Copy link

Great extension @SmBe19 appreciate your work.

Just wondering does this only work when emails are left in your inbox as whenever I move them to a folder or sub-folder the link doesn't work.

Thanks

@SmBe19
Copy link
Owner

SmBe19 commented Feb 28, 2022

@dionsternberg Yes, this only works if the email is not moved after the task is created. So if you create the task in the inbox, the link breaks if you move it to a subfolder. I believe if you first move it to a subfolder and then create a task, the link will work (as long as the email is not moved again).

Unfortunately, the link to an email changes when the email is moved to a different folder. As far as I know, there is currently no suitable way to open a message just by some message id, you have to include the folder in the link.

@dionsternberg
Copy link

@dionsternberg Yes, this only works if the email is not moved after the task is created. So if you create the task in the inbox, the link breaks if you move it to a subfolder. I believe if you first move it to a subfolder and then create a task, the link will work (as long as the email is not moved again).

Unfortunately, the link to an email changes when the email is moved to a different folder. As far as I know, there is currently no suitable way to open a message just by some message id, you have to include the folder in the link.

Im having the problem that it won’t link to the email unless it is in the inbox

@CedricCourson
Copy link
Author

this file (by @lugiii93 ): https://www.file-upload.net/download-14849504/ThunderbirdMailLinksintoRegistry.reg.html
work fine !!!!

Thank you @lugiii93 and @kteevee for solving the pb :-)
My test was on windows 10, with thunderbird 91.6.1 (32 bits)

@dionsternberg
Copy link

why did you close @CedricCourson.

Im currently having trouble with the linking email, if someone can help me that would be great.

i have attached some screen shots to show the issue

The top mail link was made from a email that is in my inbox and will take to THunderbird's email when i click it

The bottom link was made from an email that has been placed in a folder and when i click the link it takes me to a blank todoist page

Thanks
Screenshot 2022-03-02 181051

@CedricCourson CedricCourson reopened this Mar 2, 2022
@CedricCourson
Copy link
Author

oh sorry @dionsternberg , my bad, I missread your post... I re-open it ;-)

@andimattes
Copy link

this file (by @lugiii93 ): https://www.file-upload.net/download-14849504/ThunderbirdMailLinksintoRegistry.reg.html work fine !!!!

Thank you @lugiii93 and @kteevee for solving the pb :-) My test was on windows 10, with thunderbird 91.6.1 (32 bits)

I had to change the last line of the file to
@="\"C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe\" -mail \"%1\""
because my Thunderbird was not installed in Program Files (x86). Now it works perfectly fine!
Thanks!

@mlewe
Copy link

mlewe commented Jul 8, 2022

Another hint for people who might have issues with the powershell snippet:

It needs to run with administrator privileges.

If run with normal user privileges, no error is shown (in fact there is no output at all).

There should be some output showing the successful creation of the registry keys.

@trulycool
Copy link

trulycool commented Apr 10, 2023

why did you close @CedricCourson.

Im currently having trouble with the linking email, if someone can help me that would be great.

i have attached some screen shots to show the issue

The top mail link was made from a email that is in my inbox and will take to THunderbird's email when i click it

The bottom link was made from an email that has been placed in a folder and when i click the link it takes me to a blank todoist page

Thanks Screenshot 2022-03-02 181051

Greetings @CedricCourson & @dionsternberg !

This will happen if you move the location of the email after entering it into Todoist. The folder is part of the location that is stored in the link, so if you add the email from your Inbox, then move it, the link in Todoist will still be telling Thunderbird to open something like Inbox/Important Email.msg to Do, whereas it should now be SomeOtherFolder/Important Email.msg

I have adopted a workflow where I have an @todo folder in TB, and any email which I will add to Todoist goes there first. Then add it to Todoist, and don't move it until you have completed the task in Todoist.

Alternately, if you've already added the task, and then move the email, just add it back from it's new location.

Many thanks to @SmBe19 for this excellent plugin. Have been a Thunderbird and Todoist user for many years, and when Doist abandoned their own TB plugin, I was very sad...

🙏

@trulycool
Copy link

I had the same Registry issue & fixed it when first installing this on Windows back in May of '21, but had neglected to follow the link to Github and post. My bad.

Here are the complete registry fixes needed to register both the IMAP accounts (which are already posted above), as well as the Local Mail accounts (which are not posted here yet from what I can see).

@SmBe19 You might consider providing the *.reg files in a code block in the Readme...

Running PowerShell scripts are generally going to be more locked down on Windows. Double clicking a *.reg file will provide an Admin elevation prompt / warning but will generally be easier for non-dev users to apply...

Create a file of any name with extension .reg, e.g. todoist-thunderbird-imap-message.reg

...paste below contents into file, then double click. Okay to the Admin prompt:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\imap-message]
@="URL:Thunderbird Todoist Links"
"URL Protocol"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\imap-message\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\imap-message\shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\imap-message\shell\open\command]
@="\"C:\\Program Files (x86)\\Mozilla Thunderbird\\thunderbird.exe\" -mail %1"

For Local Folders support, create: todoist-thunderbird-mailbox-message.reg

...paste below contents, double click file, accept Admin prompt:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailbox-message]
@="URL:Thunderbird Todoist Links"
"URL Protocol"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailbox-message\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailbox-message\shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailbox-message\shell\open\command]
@="\"C:\\Program Files (x86)\\Mozilla Thunderbird\\thunderbird.exe\" -mail %1"

@SmBe19
Copy link
Owner

SmBe19 commented Aug 1, 2023

@trulycool Thanks for the suggestion, I have now included the .reg template in the readme.

@gpuccio87
Copy link

Thanks for your update, the extension now also works with Thunderbird 115. However, I cannot get the links to work on Windows. I registered the protocol, but the link does not open. However, I have the impression that when the extension creates the link, the URL does not start with mid:// but only with mid:
I hope this information is not useless and can help you out.

@SmBe19
Copy link
Owner

SmBe19 commented Aug 2, 2023

This is correct, the link should just start with mid:, not with mid://. Under Linux this works as expected.

Does it work if you change it to mid://?

With the original mid: link, does Thunderbird open and just not show the correct email, or does it not open at all?

Did it work correctly with the old links?

@gpuccio87
Copy link

I just tried it on another PC. Everything is fine. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests