您的代码中有几个问题...
当您收到“每个人的电子邮件 1”时,您会收到一份参考列表,而不是电子邮件地址列表。要从参考中获取实际的电子邮件地址,您将获得它的“价值”。
sendTo 将是一个列表,因此您必须遍历列表并在邮件中一次添加一个地址。
有不同类型的收件人。您需要使用“收件人”。
尝试这个:
tell application "Contacts"
set sendToList to value of every person's email 1
end tell
set emailSender to "me@me.com"
set theSubject to "The subject of the mail"
set theContent to "message body"
tell application "Mail"
set mesg to make new outgoing message with properties {sender:emailSender, subject:theSubject, content:theContent, visible:true}
tell mesg
repeat with i from 1 to count of sendToList
set thisEmail to item i of sendToList
if thisEmail is not missing value then
make new to recipient at end of to recipients with properties {address:thisEmail}
end if
end repeat
--send
end tell
end tell