|resources:||Home Installation Screenshots Tweaks Source Code Members Bugs Donate|
The Defer tweak defers messages until a later time. It is only available in Thunderbird 3.
To defer one or more received messages, select the messages and choose Message – Defer. Specify a time in the future. The messages move to the Deferred subfolder of your Outbox. When the future time arrives, Mail Tweak moves the message back to your Inbox for you to deal with.
To defer an outgoing message, write the message and choose File – Defer. Specify a time in the future. The message is stored in the Deferred subfolder of your Outbox. When the future time arrives, Mail Tweak moves the message back to your Outbox, then it sends all the messages in your Outbox.
To specify a time, you can either press one of the preset buttons, or you can specify a time and date and then press OK. To see the actual date and time represented by a preset button, hover your mouse pointer over the button until its tooltip pops up.
- Received messages always go back to the Inbox where they originally arrived, even if they were in some other folder when you deferred them.
- Deferred messages in your Inbox are marked as unread, but not as new mail. There is no new mail notification. They are optionally tagged with a tag that you specify in Mail Tweak's Options dialog.
- You cannot use your Outbox to hold messages for delivery later in the normal way, because if a deferred message has to be sent, all the messages in your Outbox will be sent at that time. To prevent messages from being sent, use Thunderbird in its offline mode (File – Offline – Work Offline).
- The date of a deferred message is the date that you specify. To see the message's original date, choose View – Message Source and look for the X-Date-Was header. The X-Date-Was header is removed from outgoing messages, so that there is no indication that they were deferred (not even in the copy in your Sent folder).
- To cancel a deferred message, go to your Local Folders account, then to the Outbox folder there, then to the Deferred subfolder. Find the message and either delete it or move it somewhere else.
- To change the date and time of a deferred message, defer it again to the new date and time. Use the Immediate button to process the message immediately.
- You can customize your toolbars to add Defer buttons in main windows, message windows and Write windows.
- You cannot use a filter to defer messages automatically. You cannot move messages directly to your Deferred folder. If you try to use one of these methods, then the message's deferred date is not set.
You can configure the default time in the Defer dialog. Filter the Config Editor for: extension.mailtweak.defer.time and specify a time using the notation for presets described below. The default setting for the default time is +1:00, meaning the start of the next hour.
The default time is only used when Thunderbird starts up and you first defer a message. While Thunderbird remains running, the time in the Defer dialog remains however you last set it. When you close Thunderbird and restart it, the time resets to the default time.
You can configure the preset times for deferring messages by editing preference settings in the Config Editor. Filter for: extension.mailtweak.defer.preset
The presets are numbered starting from 1, and four presets are supplied by default. You can remove or edit the existing presets, or add more.
The numbering does not have to be consecutive. For example, if you remove preset 3, you do not have to change preset 4.
The defaults are: Tomorrow, Monday, In a week, Next month (all at midnight)
Each preset has two preferences — a label and a spec. The label can contain any text you choose. The spec is constructed as described below.
A spec contains one or more elements separated by spaces. Each element can be a time, a date, or a weekday. The spec can include more than one element of the same type.
The elements are processed from left to right. If the first element is a time, then the result is initially the current date and time, otherwise the result is initially the current date at midnight (00:00). If an element matches the current result it does not change the result, otherwise it moves the result into the future.
An element contains one or more values. The values are processed from right to left. Each value is either a number, a number with a plus or minus sign, a comma-separated list of numbers in square brackets, or an equals sign (=).
A number with no sign indicates an absolute time, date, or weekday in the future. A number with a plus or minus sign indicates an offset forwards or backwards. A list of numbers indicates alternatives. An equals sign (=) indicates no change.
The result of processing each number value is adjusted to be in the future. For example, if the time now is 9 a.m. and you specify 10 a.m., then the result will be in one hour's time, but if the time now is already 11 a.m. and you specify 10 a.m., then the result will be tomorrow at 10 a.m.
A time element contains two numbers separated by a colon. Times use the 24-hour clock. For example:
|9:00||9 a.m. (today or tomorrow, depending what time it is now)|
|14:30||2:30 p.m. (today or tomorrow, depending what time it is now)|
|+1:=||an hour from now|
|00:00 9:00||9 a.m. tomorrow (midnight, then 9 a.m.)|
|[9,13]:00||either 9 a.m. or 1 p.m., whichever is sooner|
A date element contains three numbers separated by slashes, in the order year, month, day. For example:
|=/3/1||March 1st (any year, at midnight)|
|=/=/1||the first of next month (at midnight)|
|=/=/[1,15]||the 1st or the 15th, whichever is sooner (at midnight)|
|=/=/1 9:00||the first of next month at 9 a.m.|
|=/=/+1 9:00||tomorrow at 9 a.m.|
A weekday element is a single number. Numbers from 0 to 6 represent Sunday to Saturday. Higher numbers represent weekdays in subsequent weeks.
A plus sign or a minus sign indicates a simple number of days, regardless of weekday. For example:
|1||Monday (at midnight)|
|[1,4]||Monday or Thursday, whichever is sooner (at midnight)|
|+1 9:00||tomorrow at 9 a.m.|
|=/=/1 -1||the last day of this month (at midnight)|
|=/+1/1 -1||the last day of next month (at midnight)|
|=/=/1 1||the first Monday of next month (at midnight)|
|=/=/1 8||the second Monday of next month (at midnight)|
|=/=/1 [1,2,3,4,5]||the 1st of next month, or the following Monday if the 1st is a Saturday or Sunday|
You can use the Defer tweak from code in other extensions (for example, in a keyboard shortcut defined in keyconfig, or in a custom toolbar button defined in Custom Buttons). The basic code to use is the following line. The Defer dialog opens so that you can specify a time or cancel the operation:
You can optionally specify a date and time in the future in the same format as a preset spec. It does not have to match any of the existing presets. The Defer dialog does not open. For example, to defer for two days:
var when = new Date when.setHours(16) when.setMinutes(0) MailTweak.Defer.setup(when)
For questions or comments about Mail Tweak, please use this thread in the mozillaZine Extension/Theme Releases forum: Mail Tweak (for Thunderbird)