以下语法会在 Apple Mail 中生成发送给“收件人”的电子邮件消息。请求有关如何使用 3 个附加电子邮件地址填充抄送字段的指导。谢谢。
tell application "Mail"
set theNewMessage to make new outgoing message with properties {visible:true, subject:"Update", content:"Hi, Tom.
All set:
… on the server.
thx.
-paul."}
tell theNewMessage
make new to recipient at end of to recipients with properties {address:”[email protected]"}
activate
end tell
end tell
我花了一段时间。我已经解决了这个问题。我定义发件人。我还定义了主要收件人 + 3 个抄送收件人。
set the_subject to "Update"
set the_body to "Hi, Luciano.
All set:
… on the server.
thx.
-lucca."
tell application "Mail"
set new_message to make new outgoing message ¬
with properties {sender:"MyName <[email protected]>",
subject:the_subject, content:the_body, visible:true}
tell new_message
-- Add the recipients:
make new to recipient ¬
at end of to recipients ¬
with properties {address:"[email protected]"}
make new cc recipient ¬
at end of cc recipients ¬
with properties {address:"[email protected]"}
make new cc recipient ¬
at end of cc recipients ¬
with properties {address:"[email protected]"}
make new cc recipient ¬
at end of cc recipients ¬
with properties {address:"[email protected]"}
end tell
end tell