Hi all
How do you set the “reply to” address through Applescript when composing a new mail? I’m running this script:
tell application “Mail”
set newMessage to make new outgoing message with properties {subject:“Subject”, content:“Message body” & return & return}
tell newMessage
set sender to “Sender sender@sender.co.uk”
make new to recipient at end of to recipients with properties {name:“”, address:"recipient@recipient.co.uk"}
end tell
send newMessage
end tell
I’ve tried this which doesn’t work:
tell application “Mail”
set newMessage to make new outgoing message with properties {subject:“Subject”, reply to: “Reply to replyto@replyto.com”, content:“message body” & return & return}
tell newMessage
set sender to “Sender sender@sender.co.uk”
make new to recipient at end of to recipients with properties {name:“”, address:"recipient@recipient.co.uk"}
end tell
send newMessage
end tell
and I’ve tried this which generates an error:
tell application “Mail”
set newMessage to make new outgoing message with properties {subject:“Subject”, content:“message body” & return & return}
tell newMessage
set sender to “Sender sender@sender.co.uk”
set reply to to “Reply to replyto@replyto.com”
make new to recipient at end of to recipients with properties {name:“”, address:"recipient@recipient.co.uk"}
end tell
send newMessage
end tell
The error I get is “Mail got an error: Can’t make reply to of outgoing message ID 100699664 into type reference”
Help!