Я не так много работал с Mail, но я написал скрипт, который должен выполнять эту работу ...
set the mail_recipient to the text returned of (display dialog "To:" default answer "")
set the mail_subject to the text returned of (display dialog "Subject:" default answer "")
set the mail_content to the text returned of (display dialog "Enter your message here (for a new line type \"\\n\"):" default answer "")
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to "\\" & "n"
set this_text to every text item of the mail_content
set AppleScript's text item delimiters to return
set the mail_content to this_text as string
tell application "Mail"
tell (make new outgoing message with properties {visible:true, subject:mail_subject, content:mail_content})
make new to recipient at the end of to recipients with properties {address:mail_recipient}
send
end tell
end tell
Я не добавил проверку ошибок в скрипте (проверьтедействительный адрес получателя).
Как вы сказали, вы не можете изменить шрифт получателя;это может считаться преследованием.
Если этот сценарий не подходит, просто дайте мне знать, и я изменю его для вас.:)
ОБНОВЛЕНИЕ: Я только что прочитал об использовании AppleScript с Mail и только что понял, что Mail имеет огромные ограничения в отношении AppleScript.Я думаю, что вам лучше всего использовать GUI Scripting
.Этот скрипт довольно хакерский, но он должен работать.
tell application "System Events" to tell process "Mail" to set the mail_subject to (get the value of the first text box)
tell application "Mail" to set this_message to the content of the first message of mailbox "Sent" whose subject is the mail_subject
ОБНОВЛЕНИЕ 2:
tell application "System Events"
tell process "Mail"
set the mail_recipient to (get the value of the first text field)
set the mail_subject to (get the value of the fourth text field)
set the mail_content to (get the value of the last text field)
my create_new_message(mail_recipient, mail_subject, mail_content)
end tell
end tell
on create_new_message(recipient, subject, content)
tell application "Mail"
quit saving no
activate
tell (make new outgoing message with properties {subject:|subject|, content:|content|)
make new recipient at the end of to recipients with properties {address:|recipient|}
send
end tell
end tell
end create_new_message