Hello,
I’m not very skilled with Applescript, so please forgive my probably simple question.
I have a script that is supposed to send an email to multiple recipients, but is not working like it should. It looks like it worked by looking at my sent items in mail (the outgoing message is there with all of the recipients listed) however, only the first name in the list of recipients receive the mail . . . usually. Sometimes it actually works, but more times than not, only the first person in the list gets the email.
I tried to rework it so that the message is sent individually to each email address, but I couldn’t figure out how to make that work (I got an error saying the message couldn’t be opened after the 1st name on the list was sent the message)
Here is the script that I’m using
tell application "Mail"
set theMessage to make new outgoing message with properties {visible:true, subject:"Online PX Today! " & weekday of (current date) & " " & month of (current date) & " " & day of (current date), content:"There is an online PX made for today. Blah blah blah. "}
tell theMessage
make new to recipient at end of to recipients with properties {address:"address1@mycompany.com"}
make new to recipient at end of to recipients with properties {address:"address2@mycompany.com"}
make new to recipient at end of to recipients with properties {address:"address3@mycompany.com"}
make new to recipient at end of to recipients with properties {address:"address4@mycompany.com"}
make new to recipient at end of to recipients with properties {address:"address5@mycompany.com"}
send theMessage
end tell
end tell
Can anyone give me a suggestion on how to better write this script so that each person will get the email? A suggestion on how to send each person separately maybe?
Thanks
Darron
Model: MacbookPro 17 CoreDuo
Browser: Safari 528.16
Operating System: Mac OS X (10.5)