cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
autumn
New member
Status: New idea

It would really enhance my workflow to be able to generate links to individual emails by Message-ID that Thunderbird could register a custom-scheme link handler for. So, something like:

messageid://b69f4af8-6aab-29cc-f133-fd1671774b6c@example.com

There would be something in the message view / message list interface to right-click and "Copy MessageID URL", and a systemwide custom URL handler to respond to those links. It wouldn't matter what folder the message is in as long as Thunderbird has all the folders indexed.

Then we could paste those links into our todo lists, our calendars, documentation, or any place that we want to reference a specific message from. It's something straightforward enough that other email clients could implement the same type of thing so it's not a proprietary lock-in to Thunderbird.

And since it's keyed to the message ID in the message header and not something only in a Thunderbird database, the links would survive, say, a Thunderbird reinstall with a new profile. And for messages that were sent to multiple recipients, that same URI would find the message in their own account no matter which of the recipients used it.

3 Comments
Status changed to: New idea
Jon
Community Manager
Community Manager

Thanks for submitting an idea to the Mozilla Connect community! Your idea is now open to votes (aka kudos) and comments.

ghufron1
New member

..........

Awako
Making moves

Проблема в том что MessageID не отличается от email адреса

У себя с сделал просто, начал в  CRM системе добавлять в ссылки mailto свой префикс mailid

The problem is that the MessageID does not differ from the email address. I made it simple with myself, I started adding my mailid prefix to the mailto links in the CRM system

 

<a href='mailto:mailid:b69f4af8-6aab-29cc-f133-fd1671774b6c@example.com'>mailid:b69f4af8-6aab-29cc-f133-fd1671774b6c@example.com</a>

 

Таким образом в браузере, это выглядит как ссылка на которую пользователь может нажать.

В Thunderbird, я добавил обработчик событий:

So in the browser, it looks like a link that the user can click on. In Thunderbird, I have added an event handler:

 

Services.wm.addListener({
		onOpenWindow: function (win) {
			win.docShell.domWindow.addEventListener("DOMContentLoaded", this, {capture: true, once: true});
		},
		handleEvent: function (event) {
			const myprefix = "mailto:mailid:";
			let win = event.currentTarget;
			if (win.document.documentElement.getAttribute("windowtype") == "msgcompose") {
				if (("arguments" in win) && (win.arguments[0])) {
					let arg = win.arguments[0];
					if ((typeof arg == "string")&&(arg.indexOf(myprefix)==0)) {
							if (win.ComposeUnload) {
								let OLD_ComposeUnload = win.ComposeUnload;
								win.ComposeUnload = () => {
									try {
										OLD_ComposeUnload()
									} catch {}
								}
							}
							event.preventDefault();
							event.stopPropagation();
							win.setCursor("wait");
							let { MailUtils } = ChromeUtils.import("resource:///modules/MailUtils.jsm");
							MailUtils.openMessageByMessageId(arg.substring(myprefix.length));
							win.setCursor("auto");
							win.close();
					}
				}
			}
			win.removeEventListener(event.type, this, {capture: true, once: true});
		}
	});

 

Важно, это будет работать только если Thunderbird выбран как почтовая программа по умолчанию.

Important, this will only work if Thunderbird is selected as the default mail program.