hello all,
long time since I’ve been applescript but I’m back on the scene…
this time I’m having some mail woes I have a nice html email that I want to automate the sending of.
I created a draft that I will use to send to different people but I can’t seem to open the draft and add recipients to it and send it
I event tried to save it in a diffeent folder and redirect it anyone have any ideas on how I can accomplish my goal ?
here is the code for opening draft and adding recipients
tell application "Mail"
activate
set draft to first message of drafts mailbox whose subject is "test"
tell draft
make new to recipient at beginning of to recipients with properties {address:"someone@maildomain.com"}
end tell
end tell
this gives me the error “Mail got an error: AppleEvent handler failed.”
and this
tell application "Mail"
activate
set draft to first message of mailbox "test" whose subject is "test"
set theRedirectedEmail to redirect draft with opening window
delay 1
tell theRedirectedEmail
make new to recipient at beginning of to recipients with properties {address:"someone@maildomain.com"}
end tell
send theRedirectedEmail
end tell
give me the error “You have not specified any recipients.” and
in addition to that I can see that the recipent has been added AND I get three times the content as soon as that recipient is added
thanks for any help
mm
Browser: Firefox 3.0.6
Operating System: Mac OS X (10.5)