As I continue to fumble my way through Applescript, I stumbled upon Apple’s own Mail script package that has several nice applications.
Apple explains them as follows:
– Add Addresses (Mail): Add addresses found in the selected messages (in the header fields “From”, “To”, “Cc”, and “Bcc”) to the Address Book. This is much more flexible than the “Add Sender to Address Book” available in Mail and provides a convenient way for creating mailing lists.
– Archive Messages (Mail): Move messages from the selected mailbox(es) to an archive mailbox or export them to standard mbox or plain text files for backup purposes or import into other applications. You can select to move all messages or only messages sent within or certain period as well filter messages based on their read and flagged status.
– Change SMTP Server (Mail): Switch between different already defined SMTP servers or define a new one. This is especially useful if you are using your computer in more than one location and have to switch servers for several accounts at once.
– Create Rule (Mail): Create a new rule based on the first of the selected messages. This saves you the trouble of copy/pasting address or other info between the message and the rule window and provides a much quicker way for setting up a rule with multiple criteria/actions.
– Remove Duplicates (Mail): Locate all duplicate messages found in the selected mailbox(es) and move them to a separate mailbox for easy removal (duplicate matching is based on the unique message header “Message-Id”).
– Schedule Delivery (Mail): Allows you to send individual messages at predefined times (this script uses iCal for scheduling message delivery).
– Many additional features.