When I run the following script, the message is created and I can see it open on the screen.
tell application Mail
set newMessage to make new outgoing message
tell newMessage
set subject to "Email Received"
set content to messageBody
set visible to true
set sender to "Notification Service"
make new to recipient at end of to recipients with properties {name:"Mark Ashley", address:"priv@te.com"}
activate
end tell
end tell
If I change activate to send, then I hear the sound Mail makes when it sends a message, but the message doesn’t go in to the Sent box and the message never arrives.
What am I doing wrong?
Thanks
Mark