Signature Switch  Signature Switch


Download:
 signatureswitch2_4_1.xpi
(983 KB | sha256sum | installation instructions | addons.thunderbird.net)

Tired of removing/inserting your signature manually when composing a mail?

Sometimes you don't want specific recipients to see your signature (which may contain "personal" information).
"Signature Switch" offers removal (and re-insertion) of your signature with just one click of a button.
Moreover you can define different signatures (e.g. for private- or business-use) and easily select them via toolbar button.

But that's not all!
Additional features include the support of "fortune cookie files" and automatic switching based on recipients.
Switching or choosing the signature only affects the currently composed message of course. Your original settings remain untouched.
v2.4.1 (2020-11-23)
  • fixed "strict_min_version" to TB 78.4.0 due to usage of new APIs
v2.4.0 (2020-11-19)
  • major improvements regarding signature insertion/deletion in the composer-window
    (instead of overwriting the whole body using composeDetails, a "compose script" is being used now)
  • image placeholders ('{{image-tag}}') in fortune-cookies will now get resolved
  • bugfix: copy/paste functionality for text fields no longer broken in the options-dialog
  • various other minor improvements/optimizations
v2.3.1 (2020-11-13)
  • new option: include 'Cc' and 'Bcc' for auto switch
  • bugfix: "Default action" properly initialized in preferences dialog
  • various minor improvements/optimizations
v2.3.0 (2020-11-03)
  • new: support for mail-identities (assign signatures to identities; auto-switch)
  • updated dependencies/libs
  • various minor improvements/optimizations
v2.2.2 (2020-11-01)
  • fixed/improved internal handling for images/fortune-cookies
v2.2.1 (2020-10-24)
  • fixed signature-separator for HTML mode
v2.2.0 (2020-10-23)
  • new: preferences for 'Forwardings'
  • bugfix: doubling of line-feeds in plaintext composer on Windows
  • updated library dependencies
v2.1.0 (2020-10-12)
  • (re-)implemented support for 'Fortune Cookies'
  • new option: automatically prepend separator for HTML signatures
  • several minor bug fixes / improvements
v2.0.0 (2020-10-03)
  • initial release: new/rewritten version of this add-on as MailExtension
Here's a list of frequently asked questions:
  1. I want to place my signature above the quote when replying to an email. Can this be done using SignatureSwitch?
  2. There is a built-in Thunderbird-setting ("When quoting, [start my reply above the quote] and place my signature [below my reply (above the quote)].") to define the location of a signature. Can Signature Switch make use of this setting?
  3. Where is the old Signature Switch add-on? Everything's different now! I liked the old one better. You ruined everything! Can I get the old version back?
  4. Where is the context menu for Signature Switch? I can't find it if I right-click in the composer window.
  5. I'm using a Mac; the keyboard shortcuts don't work! What now?
  6. Is there a way to use external signature files (stored on my machine), instead of managing them directly in the add-on? (Just like the "old" SignatureSwitch used to work.)
  7. After updating to Thunderbird 78 (and updating Signature Switch) all of my signatures are gone! Can I bring them back and reuse them?
  8. When using a HTML signature I get a warning message; and my signature-image gets blocked from Thunderbird. What am I doing wrong?
  9. I've created a HTML signature by using an external editor/tool. After inserting/pasting the HTML content into Signature Switch, the displayed result is not what I expect. What's wrong?

I want to place my signature above the quote when replying to an email. Can this be done using SignatureSwitch?
No. Signature Switch won't let you configure that. There are several reasons for that.
Let me explain a few of them:
  • A signature should always be located at the very bottom of a document/email. That's why it's called a signature; not an "include".
  • If you answer to someone's email, then you can assume that he already does have your contact information. So why pollute/clutter the reply with redundant/useless information over and over again? In addition to that, people tend to keep a full quote of the sender's original text (below their answer) when composing a reply. Additionally including your signature before that quoted part would result not only in wasted space and unnecessarey data to transmit, but make things difficult to read later on. Imagine a mail bounces back and forth several times; and each participant puts his signature in between his reply and the quote. Everyone involved would have to scroll over multiple signature segments just to get a glimpse of the whole discussion. Which is more than annoying imho.
  • A signature usually has a signature separator ("-- \n"). Or at least it should have one. This separator is often used by email-clients to automatically cut off everything below that signature separator line on replies. Mainly due to the reason explained above. Otherwise you'd have a mail-body full of signatures after a few reply-bounces. Nobody wants or needs that.
    Ergo: If you would place a signature (plus the preceding separator) before the quoted text, then the quoted text could be cut off entirely upon a reply.
  • Having a fixed/defined location of the signature (combined with the signature separator) makes it more easy, efficient, and bullet-proof to detect it.
    And this allows features like switching the signature on/off, cycling through your set of available signatures, and also simply replacing it with another one possible.
There is a built-in Thunderbird-setting ("When quoting, [start my reply above the quote] and place my signature [below my reply (above the quote)].") to define the location of a signature. Can Signature Switch make use of this setting?
No. Due to the reasons explained in the in the first FAQ entry, Signature Switch won't utilize this setting in any way. Besides, Signature Switch is a pure MailExtension now. Meaning that (as of now) there's no way to read Thunderbird's (user-)settings ("prefs.js") from within a MailExtension.
Where is the old Signature Switch add-on? Everything's different now! I liked the old one better. You ruined everything! Can I get the old version back?
Simple answer: NO! :-)
As you may have heard, Mozilla dropped support for the old XPCOM/XUL add-on architecture with Thunderbird 78.
Therefore I was "forced" to completely rewrite Signature Switch using the new MailExtensions-API. Which - if I might add - was a major effort and still involves a lot of ongoing work. Unfortunately the new APIs don't yet offer all the functionality necessary to cover the feature-set of the "Legacy Signature Switch". However, things will surely improve in the future. Also, in the long run, using the more stable MailExtension-APIs will hopefully ensure that add-ons won't be broken when significant changes are being made on Thunderbird's codebase in upcoming releases.
Where is the context menu for Signature Switch? I can't find it if I right-click in the composer window.
The official MailExtension-API currently doesn't offer a hook to add custom context menu entries. This will hopefully change in the near future.
I'm using a Mac; the keyboard shortcuts don't work! What now?
Go to the add-on's settings page. Select the "Miscellaneous" tab. Under "Keyboard Shortcuts" change all instances of Ctrl to MacCtrl.
Is there a way to use external signature files (stored on my machine), instead of managing them directly in the add-on? (Just like the "old" SignatureSwitch used to work.)
Nope. The "new" SignatureSwitch is a pure MailExtension; meaning it has limited access to resources from the outside.
However, you can use the import/export feature to have the same setup on different machines.
After updating to Thunderbird 78 (and updating Signature Switch) all of my signatures are gone! Can I bring them back and reuse them?
Like explained in previous answers ("Legacy Signature Switch", "External Files"): Unfortunately, no. At least not in an automated way. However, you can still copy/paste them into the new preferences-UI.
When using a HTML signature I get a warning message; and my signature-image gets blocked from Thunderbird. What am I doing wrong?
If you get this warning…
Thunderbird has blocked a file from loading into this message.
… then you're probably using a file-reference within your signature, like this:
   <img src="file:///home/achim/images/logo.png">
Instead you should use the internal image-storage of the add-on and reference it as described in the UI:
   <img src="{{logo}}">
I've created a HTML signature by using an external editor/tool. After inserting/pasting the HTML content into Signature Switch, the displayed result is not what I expect. What's wrong?
Your HTML editor probably generates a full-blown HTML document; including html-, head-, and body-tag.

<!DOCTYPE html>
<html>
   <head>
      <title>My Signature</title>
   </head>
   <body<
      <span style="font-family:someFancyFont">Moe Zilla</span><br>
      email: moe@zilla.org<br>
      address: Main Street<br>
      phone: 666<br>
   </body>
</html>
Something like this is NOT correct!
Since your HTML email already is a document, you'd put a HTML document within a HTML document; which makes no sense and leads to unwanted side-effects.
Also be aware that any resource-references (fonts, etc.) you put in here would have to be present/accessible on the receiver's end in order to be displayed correctly.

So… you should keep it simple and really only use the HTML-tags that are needed, e.g.:

<b>Moe Zilla</b><br>
email: moe@zilla.org<br>
address: Main Street<br>
phone: 666

OLD VERSION:
Looking for the legacy version of this add-on which is compatible with Thunderbird versions below 78?
Check: Signature Switch (XUL/XPCOM)