Saturday, October 16, 2021

Logging mail sending in Thunderbird

With the introduction of the rewritten mail send there has been a huge uptick in the number of folk having issues sending mail from Thunderbird. The changes have also brought with them a new way of logging the sending of mail in Thunderbird to provide diagnostic information.

Logging is now done using the error console (Ctrl+Shift+J) in the developer tools,  but for this to occur you need to enable logging using the config editor. Modify/set the preference  mailnews.smtp.loglevel to All using the linked config editor instructions

Now open the Error Console and clear any existing entries by clicking on the trash icon.

Send a mail, debug logs should show up in the Console tab looking something like what is shown below.


If you have been asked to supply a log,  or are seeking support somewhere with failures in sending then the following will provide a text file with the log in it.

Right click the console/log window and select all from the menu.

Right click again and select the rather oddly named "copy message"

Open windows notepad.(Windows key+R type notepad and press enter)

Save the file to your documents and either copy and paste or upload the file to provide the log to others. Be aware that the From and To addresses in the email are in the log you are sharing.


This part will certainly not work in versions after 91.

Again using the config editor set the preference mailnews.smtp.jsmodule to false.  This will invoke the old mail sending code that has been replaced and already removed from Thunderbird from V93 onwards.  This will allow the diagnosis of the problems to ensure it is the new send code that is at issue. It will also allow a few months of using the old code while bugs are fixed.  Please file bug in bugzilla if you identify a bug in the new code.

Friday, October 8, 2021

Logging the new account wizard

 While most folks will never have an issue with setting up an account,  there are however  those that for inexplicable reasons find that the process fails and the message they receive as to why is less than helpful.  Offering support to those people is difficult to say the least,  however having access to a complete log makes it much simpler.

How to actually capture a log of what happened in the account setup process. I have never seen it mentioned outside the Bugzilla bug management system. 

So here goes my attempt to document these things.

First you need to change some hidden preferences in Thunderbird to get a complete log.  So go to the config editor and make the following preference changes.
mail.wizard.logging.dump to all
mail.wizard.logging.console to all
Now access the error console (ctrl+Shift+J) or via the developer tools on the tool menu and clear it by clicking the trash bin icon

Once you have done the setup you can now attempt to set up your mail account and the entire operation will be logged to the console.
Once you have the output,  right click in the consoile and select export visible content to a file.  You may need to repeat this step after scrolling the console list to get all of the relevant content into a file.

Once done with the logging change the preferences back to default as writing to the log is a somewhat expensive process and could slow Thunderbird at critical times.