dimanche 18 janvier 2015

Applescript not sending email


I am using the following code to send an email. I am checking my email but I am not receiving it. The problem is not with my email as I am able to communicate with other normally.


Code -



tell application "Mail"
set theMessage to make new outgoing message with properties {visible:true, subject:"blank", content:"Thank you"}
tell theMessage
make new to recipient at end of to recipients with properties {address:"xxxxx@yyyyy.com"}
end tell
send theMessage
set theMessages to (get selection)
repeat with eachMessage in theMessages
set theAccount to account of (mailbox of eachMessage)
move eachMessage to mailbox "Trash" of theAccount
end repeat
end tell


Also, as a side note, I am clearing the email in the mail app where a different account is logged in. Therefore, the email I sent should be untouched.





Aucun commentaire:

Enregistrer un commentaire