Can anyone let me know why this script won’t work? Whenever I run it Mail gives me an error message telling me it can’t send the message out because I haven’t specified a recipient. Any help would be appreicated.
Thanks
Steve
===================
Script follows
set theFileLocation to choose file with prompt “Please choose the HTML file to be sent:”
tell application “Mail”
set theFile to open for access theFileLocation without write permission
set theHTMLContent to read theFile from 1 to (get eof theFile)
close access theFileLocation
set theRecipients to {"ssuranie@merion.com"}
set theDisplayName to "Steve"
set theSubject to "This is a test"
set theSender to "ssuranie@merion.com"
set theMsg to make new outgoing message
tell theMsg
repeat with thisName in theRecipients
make new to recipient at beginning of to recipients ¬
with properties {address:thisName, name:theDisplayName}
end repeat
set sender to theSender
set subject to theSubject
set html content to theHTMLContent
end tell
send theMsg
end tell