Mail Scripts

Licence: Freeware
Version 2.10.2 | Release Date: 2010-05-13 | Download

Improvements/bugfixes:

  • (Schedule Delivery, Send all Drafts): fix issue with "The message cannot be sent using the server (null)" appearing when trying to send a message from a IMAP account.
  • (Remove Duplicates): adapt the script to work correctly for mailboxes located on an Exchange account.
Version 2.10.1 | Release Date: 2009-12-07 | Download

Improvements/bugfixes:

  • (Schedule Delivery): work around changes introduced in the various AppleScript dictionaries made by Apple between 10.5 and 10.6. This should fix the iCal got an error: Can’t get «class wr10» of event id "F7F4AE27-7721-4499-BE10-25423AC15D5E" of calendar id "191F4FE4-B5A4-49FC-889A-D8960638FFBF". (-1728) issue when running on 10.5.x.
Version 2.10 | Release Date: 2009-10-04 | Download

New features:

  • Updated scripts for Snow Leopard (MacOS X 10.6) compatibility - please make sure to read the Snow Leopard compatibility section.
  • (Filter Sent Messages): in addition to "Move Message ..." rule actions the script now also handles "Mark Message as Read" and "Mark Message as Flaged" actions.

Improvements/bugfixes:

  • (Archive Messages): fix visiblity of some fields in the options dialog when bringing the dialog up again after cancelling it the first time.
Version 2.9.1 | Release Date: 2009-06-28 | Download

Improvements/bugfixes:

  • (Archive Messages): make sure to limit file name length to 255 bytes, not 255 (Unicode) characters to prevent error messages when exporting messages with long subjects containing non-ASCCI characters.
  • (Archive Messages): prevent AppleScript error when choosing a new archive location if the previously selected folder was deleted while the script was running.
  • (Export Addresses): make sure that the Unicode BOM is written correctly regardless of the CPU type in order to prevent writing seemingly garbage when exporting UTF-16 files.
  • (Filter Sent Messages): correct processing of rules with multiple criteria if the first criteria was true and the second one contained an "Any Recipient" rule - "Any Recipient" was previously always matched in this case.
  • (Schedule Delivery, Send All Drafts): work around the "The message cannot be sent using the server (null)" issue for messages with formatting or attachments when running under MacOS X 10.5
    Note: messages other than plain text sent from a POP account with either of these scripts will not show up in the "Sent" mailbox after delivery - instead, you will get a copy of the message delivered to your Inbox (via Bcc).
  • Significantly decrease the download size of the scripts.
Version 2.9 | Release Date: 2009-01-26 | Download

Improvements/bugfixes:

  • (Remove Duplicates): completely rewrite the script to work around a bug in the Apple-supplied "grep" command line utility. On system 10.4 and higher the script no longer requires the presence of Message-ID headers for message matching and parsing/matching is several times faster than in previous versions. Many thanks to Charlie Ford and Ben Trask for providing new command-line utilities optimized for this task.
  • (Archive Messages): fix exporting of root-level mailboxes when preserving the mailbox hierarchy.
  • (Archive Messages): fix writing of message separator when writing multiple messages as plain text into a single file.
  • (Archive Messages): don't write "\fs20" tags around [Image] place holders when exporting messages as plain text.
  • Work around potential race conditions when starting some scripts to avoid "The variable 'theName' is not defined" error messages.
  • No longer automatically quit scripts upon completion to allow multiple runs of the same script without having to restart every time (user request).
Version 2.8.3 | Release Date: 2007-12-23 | Download

Improvements/bugfixes:

  • (Export Addresses): Fix error Can't convert "Full Name" to text. (-1700) when trying to export addresses in pre-Leopard system as non-Unicode text.
Version 2.8.2 | Release Date: 2007-11-20 | Download

Improvements/bugfixes:

  • (Export Addresses): Fix error "Address Book got an error: Can't get address 1 of person id "C45E46A9-3C82-499C-82FB-F8C11ADDA29E:ABPerson" whose label = "work". Invalid index. (-1719)" when trying to export addresses in Leopard and one of the contacts did not have a work address.
Version 2.8.1 | Release Date: 2007-11-20 | Download

Improvements/bugfixes:

  • (Schedule Delivery): Make the script work again on pre-10.5 systems - iCal's AppleScript dictionary for an event's "uid" changed between 10.4 and 10.5 - simply compiling the script in 10.5 made it fail in earlier system versions. The script now compiles correctly under Leopard for all system versions but might no longer compile under earlier system versions without changes.
  • (Schedule Delivery, Send all Drafts): try to work around a problem where Mail fails to return the account of a draft messages (which would have manifested itself in the error message "The variable theAccount is not defined" and a failure to actually send the messages before).
Version 2.8 | Release Date: 2007-11-12 | Download

2.8 (November 11, 2007)

New features:

  • Updated scripts for Leopard (MacOS X 10.5) compatibility - please make sure to read the Leopard compatibility section in the Read Me

Improvements/bugfixes:

  • (Search Addresses): remove automatic adding of search terms to the list when pressing "Enter" (which was added in version 2.7.14) - it had a few unintended side-effects that made searching a little unpredictable.
Version 2.7.16 | Release Date: 2007-10-21 | Download

Improvements/bugfixes:

  • (Send all Drafts): fix bug introduced in 2.7.15 wich would result in an AppleScript error (Mail got an error: can't make |account| of |mailbox| of message id … of mailbox "Drafts" of account "…" into type reference. (-1700)) when trying to send non-text/plain messages in 10.4.x.
Version 2.7.15 | Release Date: 2007-10-14 | Download

Improvements/bugfixes:

  • (Archive Messages): properly preserve the mailbox hierarchy when exporting nested mailbox hierarchies to disk - apparently this was broken since 2.7.12.
  • (Schedule Delivery, Send all Drafts): small improvement in speed and robustness when sending messages in HTML or containing attachments (10.4.x).
Version 2.7.14 | Release Date: 2007-09-30 | Download

Improvements/bugfixes:

  • (Archive Messages, Remove Duplicates): highlight the mailbox currently processed and scroll the table view so that it is visible in order to provide better feedback about the current status of the script.
  • (Archive Messages, Remove Duplicates): make the mailbox column auto-resize when resizing the window so that we don't cut off the end of long mailbox names.
  • (Archive Messages): make sure that exporting to one RTF file per message works correctly in MacOS X 10.3.x (problem caused by change in AppleScript's "do shell script" behavior).
  • (Schedule Delivery, Send all Drafts): improve message sending of richt-text messages and messages with attachments - the "Date:" header will now show the correct date/time the message was sent (not the time the draft was last saved).
    Note: The date/time in the message list in Mail might still be shown incorrectly - a mailbox rebuild will correct this.
  • (Schedule Delivery, Send all Drafts): find a more elegant way to convince Mail to send messages from the Outbox - the scripts will no longer quit and restart Mail to achieve this.
  • (Schedule Delivery): remove the 'Mail Scripts' calendar from iCal after sending the last scheduled message.
  • (Schedule Delivery, Search Addresses): improve keyboard navigation/focus - hitting "Enter" in a text field will now trigger the expected action.
Version 2.7.13 | Release Date: 2007-04-22 | Download

Improvements/bugfixes:

  • (Archive Messages): when running on an Intel processor, explicitly invoke Rosetta when running perl - it seems like Apple changed the way Rosetta is used in bundled applications.
    This should get rid of the error message "Archive Messages (Mail Scripts): Can't load 'Perl/auto/MIME/Base64/Base64.bundle' for module MIME::Base64: dlopen(Perl/auto/MIME/Base64/Base64.bundle, 1): no suitable image found. Did find: Perl/auto/MIME/Base64/Base64.bundle: mach-o, but wrong architecture at /System/Library/Perl/5.8.6/darwin-thread-multi-2level/DynaLoader.pm line 230." in the console.log and incorrectly formatted messages when exporting to rich or plain text.
Version 2.7.12 | Release Date: 2007-04-21 | Download

Improvements/bugfixes:

  • (Add Addresses): don't show smart groups in the popup as new contacts obviously cannot be added manually to a smart group.
  • (Add Addresses): try to work around a bug in Mail (Apple bug ID 5147376) where it fails to parse addresses in the form "<user@host>" (they would have displayed as "<user@host> <user@host> <user@host>" before, leading to some ugly entries in the Address Book).
  • (Add Addresses): remember the last selection for the address label and preselect it when starting the script the next time.
  • (Archive Messages): when exporting to rich text files, create *.rtfd packages only when needed (i.e., when attachments are present) - the script now defaults to simple *.rtf files. This will make opening the files with applications not familiar with the *.rtfd format (e.g., Microsoft Word) easier.
  • (Archive Messages): also add a file extension when exporting to one file per message to make the resulting files' format a little more obvious.
  • (Archive Messages): use a shell script instead of calling the Finder when creating folders for exported messages - this hopefully will avoid the timing issues leading to random type -1409 errors.
  • (Filter Sent Messages): Fix the script to correctly work for rules based on custom messages headers.
  • (Remove Duplicates): don't ignore Message-IDs shorter than 12 characters when looking for potential duplicates.
  • (Remove Duplicates): a few fixes for character escaping in the shell scripts for initial scanning for duplicate Message-IDs.
  • (Remove Duplicates): be a little smarter about which message to move to the duplicates folder based on message status - the message status is now ranked based on message flags in the following order: flagged, replied, redirected, forwarded, read.
Version 2.7.11 | Release Date: 2006-08-21 | Download

Improvements/bugfixes:

  • (Add Addresses): also scan the "Reply-To" header and add addresses to the list which can be added to the Address Book.
  • (Archive Messages): try to work around a race condition in the file creation of AppleScript in order to avoid errors of type -1409 when exporting to one RTF file per message.
  • (Remove Duplicates): when running on 10.4.x, improve the speed of the initial scanning for Message-IDs by adding "-m 1" to the grep used in the bundled shell script.
  • (Remove Duplicates): properly identify duplicates with Message-ID headers spanning two lines or containing "*" characters.
  • (Export Addresses): use ";" instead of "," as the line separator in addresses with multiple lines when exporting to a comma-separated file.