2 questions for Mail.app (setting font face & sorting mail)

Hi,

I’ve just picked up applescript and i must say it’s a very powerful language! And i Love IT!!

I also experimented applescript with mail.app and created mails to be sent and stuff.

1st question I have is how do i set the font face for the contents in the mail?

I’m using AppleScript to fill the contents of the mail.
e.g.
set content_variable to “Upcoming Events”
set theMessage to make new outgoing message with properties {visible:true, subject:subject_variable, content:content_variable}

I’ve read somewhere that one way is to set the mail message to a HTML mail message and use the tags…
Another way is to use UI scripting and do CMD+A then set the font through the menu.

Is there a way to set the header of the mail message to set the font to say monaco 12?


2nd question is can i sort the messages according to the sender

Now when using the line "set myMessages to messages in mailbox “Report” of account “IMAP”

the messages are sorted by the message id or rather the time at which they are sent in.
This is slightly unfavourable in my usage as I want the mails to be sorted by the Sender’s name instead as it is always a constant and does not depend on when the mail was received.

Is there a way to sort mail messages using AppleScript?

Oh, one more question, is there a link to a dictionary of Mail.app functions/terms that applescript can call?

Thank You!