You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何用AppleScript为Apple Mail邮件添加3个Cc收件人

在Apple Mail的AppleScript中添加Cc收件人

要给邮件添加3个Cc收件人,只需在现有代码的tell theNewMessage代码块内,仿照添加to recipient的方式,添加cc recipient对象即可。以下是修改后的完整代码:

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
        -- 添加To收件人(注意替换原代码的中文引号为英文引号)
        make new to recipient at end of to recipients with properties {address:"tom@zepoffice.com"}
        -- 添加3个Cc收件人
        make new cc recipient at end of cc recipients with properties {address:"cc1@example.com"}
        make new cc recipient at end of cc recipients with properties {address:"cc2@example.com"}
        make new cc recipient at end of cc recipients with properties {address:"cc3@example.com"}
        activate
    end tell
end tell

关键说明:

  • 添加Cc收件人的语法和To收件人一致,仅需将to recipient替换为cc recipient,to recipients替换为cc recipients。
  • 原代码中address:”tom@zepoffice.com"使用了中文双引号,会导致脚本报错,需替换为英文双引号"tom@zepoffice.com"。
  • 可根据实际需求修改cc1@example.com、cc2@example.com、cc3@example.com为真实邮箱地址。

内容的提问来源于stack exchange,提问作者Paul

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 18:04:56