Skip to content
Frederick Zhang edited this page Jan 18, 2024 · 50 revisions

Installation and Configuration

Both the extension and the native messaging host need to be installed.

You can install the extension from addons.thunderbird.net and the messaging host from Releases; or both of them from Releases. You'll need to download the messaging host again manually when the extension updates.

Read platform-specific pages below for details.

Tips, FAQ, and Troubleshooting

Editing emails

External Editor Revived presents emails in a format similar to EML:

Header1: foo
Header2: bar

Body

NB The blank line above body is mandatory. And there must be no blank lines in-between headers.

You can add or remove headers yourself. External Editor Revived recognises the following headers:

Name Options Note
From N/A
To N/A
Cc N/A
Bcc N/A
Reply-To N/A
X-ExtEditorR-Send-On-Exit true / false Introduced in v0.2.0. See Send on Exit.
X-ExtEditorR N/A Introduced in v1.0.0. See Meta Headers.
X-ExtEditorR-Attach-vCard true / false Introduced in v1.0.0. See below regarding brackets.
X-ExtEditorR-Priority lowest / low / normal / high / highest Introduced in v1.0.0.
X-ExtEditorR-Delivery-Format auto / plaintext / html / both Introduced in v1.0.0. See below regarding brackets.
X-ExtEditorR-Return-Receipt true / false Introduced in v1.0.0.
X-ExtEditorR-Delivery-Status-Notification true / false Introduced in v1.0.0.
X-ExtEditorR-DSN true / false Introduced in v1.0.0. Alias of X-ExtEditorR-Delivery-Status-Notification.
X-ExtEditorR-Allow-X-Headers true / false Introduced in v1.0.0. See Custom Headers.
X-ExtEditorR-Allow-Custom-Headers true / false Introduced in v1.0.0. Alias of X-ExtEditorR-Allow-X-Headers.

Some header values come with surrounding brackets, e.g. X-ExtEditorR-Attach-vCard: [false]. Such values are ignored by External Editor Revived. You must remove the brackets to explicitly set the corresponding options.

Toolbar buttons

  • Main window: click to create a new email, shift-click to enable send-on-exit by default
  • Composing window: click to edit current email, shift-click to enable send-on-exit by default

Keyboard shortcuts

You can view and customise shortcuts at Add-ons Manager -> Extensions -> gear button -> Manage Extension Shortcuts.

List of supported commands:

  • Create a new message
  • Create a new message with Send-On-Exit
  • Edit current message (Ctrl-E on Linux/Windows, Command-E on macOS)*
  • Edit current message with Send-On-Exit (Ctrl-Shift-E on Linux/Windows, Command-Shift-E on macOS)*
  • Reply to sender
  • Reply to sender with Send-On-Exit
  • Reply to all
  • Reply to all with Send-On-Exit
  • Reply to list
  • Reply to list with Send-On-Exit

* If you have trouble resetting them to default under macOS, re-install the extension.

Send on Exit

If you use X-ExtEditorR-Send-On-Exit: true header in your email, External Editor Revived will try sending it out immediately after the editor process exits.

(Previously called 'Send on Save'.)

Meta headers

X-ExtEditorR meta header allows having more than one X-ExtEditorR-* header each line. External Editor Revived processes headers that come after an X-ExtEditorR: as if they had an X-ExtEditorR- prefix.

For example,

X-ExtEditorR: Return-Receipt: false  , Allow-X-Headers: false
X-ExtEditorR: Send-On-Exit:   false

...is exactly the same as

X-ExtEditorR-Return-Receipt:  false
X-ExtEditorR-Allow-X-Headers: false
X-ExtEditorR-Send-On-Exit:    false

If you find X-ExtEditorR meta headers cleaner, you can also switch on the extension setting to present X-ExtEditorR-* headers with it by default.

Custom headers

Set X-ExtEditorR-Allow-X-Headers: true, then add X- headers. You can also switch this on by default in the extension's preferences.

Note since X-ExtEditorR has already been taken by Meta Headers, to send a custom header whose name starts with X-ExtEditorR, you must add an additional X-ExtEditorR- prefix.

For example,

X-ExtEditorR: Allow-X-Headers: true
X-ExtEditorR: X-ExtEditorR: hello
X-ExtEditorR-X-ExtEditorR-Greetings: hello
X-Foo: bar

This will send 3 custom headers: `X-ExtEditorR: hello`, `X-ExtEditorR-Greetings:
hello`, and `X-Foo: bar`.

Customising temporary directory

By default External Editor Revived places the temporary EML files in the system temporary directory.

Since v0.5.0, this can be changed in the extension's preferences.

Note External Editor Revived does NOT create the directory or update its ACL. You have to create it beforehand and make sure it's writable. In case any further customisation is needed, you can create a wrapper then update the native manifest, e.g.

#!/usr/bin/env bash
umask 0077
mkdir -p "/path/to/temp"
/path/to/external-editor-revived "$@"

Plain text emails

For the best experience, configure Thunderbird to compose emails in plain text.

Navigate to Account Settings -> Composition & Addressing, then uncheck Compose messages in HTML format. You need to do this for all accounts that you'd like to use External Editor Revived with.

For more details, see: http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email.

Advanced usage

Feel free to post your custom setup to Discussions as well!

FAQs

How does External Editor Revived work?

Since Thunderbird no longer supports XUL extensions, it's not possible to launch external programs directly with an extension alone.

External Editor Revived uses a companion native messaging host which launches editors externally instead. Thunderbird starts the messaging host, sends all the info over to it via stdio, and waits for responses to update emails accordingly.

Why does External Editor Revived require these permissions?

  • Exchange messages with programs other than Thunderbird (nativeMessaging): To talk to the messaging host, which launches external editors
  • See your mail accounts, their identities and their folders (accountsRead): To reply with correct identities
  • Read and modify your messages as you compose and send them (compose): To edit current email in composing window
  • Send composed email messages on your behalf (compose.send): To support Send-On-Exit
  • Read your email messages and mark or tag them (messagesRead): To reply to emails which needs messages IDs
  • Display notifications to you (notifications): To notify users of warnings and errors
  • storage: To store configurations

There are too many X-ExtEditorR-* headers! What can I do?

You can turn on Meta Headers so that External Editor Revived renders two X-ExtEditorR-* headers per line.

Further customisations can also be done using shell scripts or potentially in your editor.

Troubleshooting

Where can I find logs?

Tools -> Developer Tools -> Error Console. Note you need to open Error Console first to see all logs.

You can also start Thunderbird with thunderbird --jsconsole, and it'll open Error Console immediately upon start.

I updated the MailExtension and the messaging host and it's now complaining 'version mismatch'

You need to reload the extension for it to pick up the latest messaging host binary.

Alternatively just restart Thunderbird.

Screenshots

main window composing window neovim settings shortcuts