the first mail script i made worked with the app “Mail” but the one i am working on gets an error “Mail got an error: AppleEvent handler failed.” number -10000 and i want to make it so i can send emails through the hotmail website
any ideas?
the mail script that I’m working on:
tell application "System Events"
tell application "Mail"
activate
set theSubject to (display dialog "Subject: " default answer "")
set theContent to (display dialog "Message: " default answer "")
set myEmail to (display dialog "To: " default answer "")
set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:false}
tell theMessage
make new to recipient at end of to recipients with properties {address:myEmail}
send
end tell
end tell
end tell
Model: Macbook Pro
AppleScript: Version 2.3 (118)
Browser: Firefox 9.0.1
Operating System: Mac OS X (10.6)
tell application "System Events"
tell application "Mail"
hidden
activate
set theSubject to text returned of (display dialog "Subject: " default answer "")
set theContent to text returned of (display dialog "Message: " default answer "")
set myEmail to text returned of (display dialog "To: " default answer "")
set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
tell theMessage
make new to recipient at end of to recipients with properties {address:myEmail}
send
end tell
end tell
end tell
i don’t know if “hidden” does anything but it still works
Model: Macbook Pro
AppleScript: Version 2.3 (118)
Browser: Firefox 9.0.1
Operating System: Mac OS X (10.6)