Automate Mail.app reply
Automate Mail.app reply
- Subject: Automate Mail.app reply
- From: Sander Rijken <email@hidden>
- Date: Sat, 12 Jan 2008 22:40:56 +0100
Hello,
I'm trying to write an AppleScript automator task to reply to mail messages passed in by some other action. To do so I first created a testscript which has some problems.
Can someone help me diagnose those problems, or give other advice on this script?
By the way, I'm running Leopard, and the discussion going on here doesn't seem very promising:
-- Regards, Sander Rijken
PS: sorry if this is a repost, but it seems that the first post has gone wrong tell application "Mail"
set theContent to text returned of (display dialog "Enter the message that should be sent" default answer "Message" buttons {"OK"} default button 1)
tell the front message viewer
set theMessages to selected messages
end tell
repeat with theMessage in theMessages
set theSender to sender of theMessage
set senderName to extract name from theSender
set senderAddress to extract address from theSender
if theMessage is not equal to missing value then
(* causes 2 message windows, one is the reply, the other one is a message which is all blank (headers+body) *)
set theReply to reply theMessage with properties
(* sometimes fails with AppleEvent handler failed *)
make new cc recipient at end of cc recipients of theReply with properties {address:"<email@hidden>"}
set content of theReply to theContent
send theReply
end if
end repeat
end tell |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden