Well, on looking through Mail’s dictionary in Script Editor, you can do all sorts of things. For example, there is a “forward” command that would create an outgoing message that contains the entire contents of the incoming message, so you could literally send the entire message to your Blackberry. There is also a “redirect” command that will do the same thing, basically.
The “message” object has a bunch of properties that you can get a hold of and re-use. Here’s the entry:
message‚n [inh. item] : An email message
elements
contains bcc recipients, cc recipients, recipients, to recipients, headers, mail attachments; contained by message viewers, mailboxes.
properties
id (integer, r/o) : The unique identifier of the message.
all headers (string, r/o) : All the headers of the message
background color (blue/gray/green/none/orange/other/purple/red/yellow) : The background color of the message
mailbox (mailbox) : The mailbox in which this message is filed
content (string) : Contents of an email message
date received (date, r/o) : The date a message was received
date sent (date, r/o) : The date a message was sent
deleted status (boolean) : Indicates whether the message is deleted or not
flagged status (boolean) : Indicates whether the message is flagged or not
junk mail status (boolean) : Indicates whether the message has been marked junk or evaluated to be junk by the junk mail filter.
read status (boolean) : Indicates whether the message is read or not
message id (string, r/o) : The unique message ID string
source (string, r/o) : Raw source of the message
reply to (string) : The address that replies should be sent to
message size (integer) : The size (in bytes) of a message
sender (string) : The sender of the message
subject (string) : The subject of the message
was forwarded (boolean) : Indicates whether the message was forwarded or not
was redirected (boolean) : Indicates whether the message was redirected or not
was replied to (boolean) : Indicates whether the message was replied to or not
Out of these properties, you can build a custom email to suit your needs, and then using the “outgoing message” object, you can plug your information into this:
outgoing message‚n [inh. item] : A new email message
elements
contains bcc recipients, cc recipients, recipients, to recipients; contained by application.
properties
content (string) : The contents of the message
sender (string) : The sender of the message
subject (string) : The subject of the message
content (string) : The contents of the message
visible (boolean) : Controls whether the message window is shown on the screen. The default is false
message signature (signature) : The signature of the message
id (integer, r/o) : The unique identifier of the message
(Oddly, notice that “content” is specified twice! Mail’s scriptability has some flakiness as many scripters have noted. Most well-known is that in Tiger Apple broke the “signature” object so that you can’t set up a new signature in Applescript. Well, you can, but it’s not saved when the application quits for some reason…)