将联系人电子邮件导出到邮件
Exporting contact emails to mail
我已经尝试了一段时间来创建一个代码,该代码将获取我联系人中所有人的所有电子邮件,然后将所有这些放入抄送箱中的电子邮件中,以便它发送我联系人中的所有人。
感谢您的帮助:)
像这样:
tell application "Contacts"
set emailLists to value of email of every person
end tell
set bigList to ""
repeat with thisEmailList in emailLists
repeat with thisAddy in thisEmailList
set bigList to "" & bigList & (thisAddy as string) & ", "
end repeat
end repeat
if bigList ends with ", " then set bigList to text 1 thru -3 of bigList
tell application "Mail"
activate
set theNewMessage to make new outgoing message with properties {subject:"", content:"", visible:true}
tell theNewMessage
make new to recipient at end of cc recipients with properties {address:bigList}
end tell
end tell
我已经尝试了一段时间来创建一个代码,该代码将获取我联系人中所有人的所有电子邮件,然后将所有这些放入抄送箱中的电子邮件中,以便它发送我联系人中的所有人。
感谢您的帮助:)
像这样:
tell application "Contacts"
set emailLists to value of email of every person
end tell
set bigList to ""
repeat with thisEmailList in emailLists
repeat with thisAddy in thisEmailList
set bigList to "" & bigList & (thisAddy as string) & ", "
end repeat
end repeat
if bigList ends with ", " then set bigList to text 1 thru -3 of bigList
tell application "Mail"
activate
set theNewMessage to make new outgoing message with properties {subject:"", content:"", visible:true}
tell theNewMessage
make new to recipient at end of cc recipients with properties {address:bigList}
end tell
end tell