After Unsent Mail Is Sent 2.01 Requires Restart
by David White
Sorry but this addon is no longer supported in TB 60. See below.
Run a program of your choice after unsent mail has been sent.
About this Add-on
Some Thunderbird users make significant use of the "Send Later" function which accumulates outgoing email in the Unsent Messages folder to be sent at a later time. Often this is done because such emails are large in number and/or have large attachments which will make the overhead of sending in real time unattractive. Users will wait until an attractive time and then trigger the sending of these emails using the "Send Unsent Messages" function on the Unsent Messages context menu.
This simple addon permits you to specify a program and associated parameters to be run after the completion of sending unsent messages in this way. One common use for this will be to shut down the computer after this task is completed. On Windows, one would specify C:\windows\system32\shutdown.exe as the program to run and -s as the program parameter. Other systems have similar capabilities. Of course, you could run a program that starts a backup, virus scan, or anything else that suits your fancy.
The addon's options panel permits you to specify default values for both command and parameters. You may also specify that the addon NOT prompt you to enter this information each time you trigger Send Unsent Messages - instead it will always run the default command/parameters without asking.
If you opt to be prompted each time (the default), you will be presented with the last command/parameters used as defaults. Whatever you enter becomes the new default. If you are prompted and do NOT want to run any program at all, simply press the Cancel button on the dialog.
Specifying parameters is done one parameter at a time. A parameter is generally a single, space delimited element that is needed to control the execution of the program in question. For example, the Windows shutdown command accepts several parameters some of which include:
-s Shutdown the computer
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment
If you wanted to specify all of these, you will need to respond to the parameters prompt a total of 5 times:
1) -s
2) -t
3) xx (the number of seconds)
4) -c
5) "shutdown after sending unsent messages" (a shutdown comment)
The options panel permits you to test the command and parameters you have entered. When you do this, the program will actually be executed so please be aware.