disable the "send anyways" warning when nothing in subject

User Help for Mozilla Thunderbird
Post Reply
dazco
Posts: 391
Joined: July 9th, 2004, 12:38 pm

disable the "send anyways" warning when nothing in subject

Post by dazco »

Every time i send w/o anything in the subject line i get the "send anyways?" prompt. I cannot find a way to disable that other then 2 different addons, neoither of which thunderbird will install. I guess it's due to the version, i have the latest 78.0.1.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: disable the "send anyways" warning when nothing in subje

Post by tanstaafl »

The send without subject add-on used to be the normal workaround. You could get it to work with version 60 by setting "extensions.strictCompatibility" to "false" in the config editor. However, it's a legacy add-on so there is no way to get it to work in version 78.

The "Allow Empty Subject" add-on seemed to have stopped working about 5 years ago.

I'm not aware of a setting to do what you want. I tried creating a template with a couple of spaces in the Subject and double clicking on it rather than using the Write button but it complained when I tried to send it. However, adding a single period as the subject in the template works.
dazco
Posts: 391
Joined: July 9th, 2004, 12:38 pm

Re: disable the "send anyways" warning when nothing in subje

Post by dazco »

tanstaafl wrote:The send without subject add-on used to be the normal workaround. You could get it to work with version 60 by setting "extensions.strictCompatibility" to "false" in the config editor. However, it's a legacy add-on so there is no way to get it to work in version 78.

The "Allow Empty Subject" add-on seemed to have stopped working about 5 years ago.

I'm not aware of a setting to do what you want. I tried creating a template with a couple of spaces in the Subject and double clicking on it rather than using the Write button but it complained when I tried to send it. However, adding a single period as the subject in the template works.
Is there a way to set it so theres a period in the subject by default? Seems like u r suggesting that (template?) but i have no idea how.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: disable the "send anyways" warning when nothing in subje

Post by tanstaafl »

Create a message that has no recipient or content, add a period to the subject and use save -> template to save it as a template in the templates folder. Then double click on that template rather than pressing the write button whenever you want to compose a message.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: disable the "send anyways" warning when nothing in subje

Post by morat »

You could use the userChromeJS extension to send messages without a subject and without a confirm prompt. (for advanced users only)

Code: Select all

/* Thunderbird userChrome.js */

// Thunderbird 68 uses the messengercompose.xul page.
// Thunderbird 78 uses the messengercompose.xhtml page.

(function () {
  if (location == "chrome://messenger/content/messengercompose/messengercompose.xul" ||
      location == "chrome://messenger/content/messengercompose/messengercompose.xhtml") {
    try {
      var a = "    // Remind the person if there isn't a subject" + "\n";
      var b = '    if (subject == "") {';
      var c = "    if (false) {";
      eval("GenericSendMessage = " + GenericSendMessage.toString().
        replace(a + b, a + c));
    } catch (e) {
      Components.utils.reportError(e);
    }
  }
})();
userChromeJS by jikamens (compatible with TB 68 and TB 78)
http://addons.thunderbird.net/thunderbird/addon/986610

Instructions:

1. install userChromeJS extension
2. close email client
3. create or edit the userChrome.js file in the chrome folder
4. open email client

You do not need to purge the caches with jikamens' version.

userChromeJS by alta88 (obsolete)
http://userchromejs.mozdev.org/
http://userchromejs.mozdev.org/faq.html

Reference
http://searchfox.org/comm-esr68/search? ... the+person
http://searchfox.org/comm-esr78/search? ... the+person

P.S.

Thanks to Jorg K for porting userChromeJS to Thunderbird 78.

-----

Alternative solution...

You could use the userChromeJS extension to automatically click the "Send Without Subject" button. (for advanced users only)

Code: Select all

/* Thunderbird userChrome.js */

(function () {
  if (location == "chrome://messenger/content/messengercompose/messengercompose.xhtml") {
    Services.ww.registerNotification(function onOpen(aSubject, aTopic, aData) {
      if (aTopic == "domwindowopened" && aSubject instanceof Components.interfaces.nsIDOMWindow) {
        var chromeWindow = aSubject;
        chromeWindow.addEventListener("DOMContentLoaded", function () {
          if (chromeWindow.document.documentURI == "chrome://global/content/commonDialog.xhtml") {
            chromeWindow.setTimeout(function () {
              try {
                var dialog = chromeWindow.document.getElementById("commonDialog");
                var button = dialog.shadowRoot.querySelector('button[label="Send Without Subject"]');
                if (button) {
                  button.click();
                }
              } catch (e) {
                Components.utils.reportError(e);
              }
            }, 3000);
          }
        }, {once: true});
      }
    });
  }
})();
Reference
http://searchfox.org/comm-esr102/search ... tification
http://searchfox.org/mozilla-esr102/sou ... atcher.idl
Post Reply