PrintCamiel Bouchier4

#### Intro - Thanks

I am a long time user of thunderlink as can be found on addons.thunderbird.net or github. I can't imagine my workflow and electronic archive without!

It's functionality is as simple as useful : click (or paste) a link from your personal wiki into thunderbird and it opens the associated message.

However Thunderbird changed quite drastically the underlying APIs and thefore thunderlink stopped working on recent versions. See e.g. this announcement. A complete re-think and re-write was needed and the original author did not have the time. So I took the task doing so.

Big thanks to Mike Hardy and team for having thunderlink supported all this time!

##### thunderlink:// versus cbthunderlink://

The original thunderlink identified messages in an unique way by using message-id of the email. Links would read like thunderlink://messageid=somestuff@foobar. cb_thunderlink still fully supports this.

However, there is a remote risk that searching on the message-id gets lost in the further future reduction of Thunderbird API. Therefore a second mechanism was introduced named cbthunderlink. This identifies messages in an unique way using the message-date and message-author. Links would read like cbthunderlink://SomeBase64String. It might be slightly more future-proof to start using those.

Features work for both and where needed I will distinguish them as cbthunderlink, thunderlink or (cb)thunderlink when referring to both.

##### Clickable - OS-integration

Thunderlinks clickable-feature depended on being able calling the thunderbird -thunderlink xyz command. However Thunderbird has also dropped support therefore...

To keep that feature available, cb_thunderlink comes with an accompanying program, started automatically by the add-on, to emulate that feature and make links clickable again. Note that currently this is only available yet for Windows and for some Linuxes.

However, cb_thunderlink can be used perfectly well without that accompanying program. Links need to be cut then from your source and pasted (using the cb_thunderlink button) into Thunderbird.

#### Description - usage

(cb)thunderlink's are durable hyperlinks to specific email messages.

You can use them anywhere you want immediate access to the original message contents in full. For example, wikis, task trackers, etc.

Click on (cb)thunderlink later to open that specific message in Thunderbird. (when not installing the accompanying program, copy the link and paste it using cb_thunderlink button)

You may customize (cb)thunderlink formats to fit your needs.

(cb)thunderlink's are durable even if you file the message. This enables the Thunderbird email client to quickly and reliably find and select any email that exists in your Thunderbird mail store.

@Txeni: That is pretty straightforward in cb_background.js

 let author  = the_message.author
let date    = the_message.date
let subject = the_message.subject
let cblink  =  utoa(date.toJSON() + ";" + author)

and

//
// https://base64.guru/developers/javascript/examples/unicode-strings
//
// Unicode to ASCII (encode data to Base64)
// @param {string} data
// @return {string}
//

function utoa(data) {
return btoa(unescape(encodeURIComponent(data)));
}

2. Txeni

This is amazing, thanks sooooo much, I updated today to thunderbird 78 and I was in total panic about Thunderbird not working.

One question, could you explain how you transform from message-date and message-author to the base64 string in the cb_thunderlink? Or maybe direct me to where this is in the code? I cannot find it and it would be great to know to feel completely future proof...

Yes, I do : thunderbird.exe -thunderlink ... does not work anymore.

This is explained in more detail here, in particular on the OS integration.

Long story short, if you need the equivalent, you need to issue cb_thunderlink.py (cb)thunderlink://.... The OS integration does take care of that, so normally you would not do this manually, but it is possible.

Camiel B.

4. Robert

Hey, I install the extension in Thunderbird 64bit. I generated a link and pasted it using the dedicated button. This works. Then I tried to test the Windows CMD for OS integration by

call "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" -thunderlink "MjAyMS0wMi0xMlQxMzowMjo0NC4wMDBaO1BhdmxpbmEgQmlub3ZhIDxiaW5vdmFAcmVrLnpjdS5jej4="

and nothing happened. In the console I saw the error generated by "cb_background.js" which read: