通过AppleScript从Mac号码发送邮件

时间:2016-03-23 15:42:26

标签: automation numbers applescript

我有一个数字文档,里面有两个表。第一个就像一个简单的表单,我输入数据并从下拉列表中选择值(人的姓名和他的电子邮件+消息中使用的值)。第二个表是生成消息的地方。

<script>

现在,我将邮件复制/粘贴到邮件中并手动放置主题/人物。 有人可以帮我一个AppleScript,我会打电话给他们,比如从Script菜单栏中输入数字,它会根据数字值创建一条消息+ +收件人和主题吗?

也许甚至可以为组合邮件拉特定的文具?

1 个答案:

答案 0 :(得分:0)

我没有使用Number,但我假设您可以将Numbers单元格的值提取到Applescript变量中。然后创建一个邮件:

set mySubject to "subject value from Numbers"
set myContent to "text content" -- in can be a concat of text and variables
set mySignature to "name of signature created in Mail"
set myContact to "joh,@doe.com"

tell application "Mail"
activate
set newMessage to make new outgoing message with properties {visible:true, subject:mySubject, content:myContent}
set message signature of newMessage to signature Ma_Signature -- not mandatory
tell newMessage
    make new to recipient at end of to recipients with properties {name:"", address:myContact}
end tell
end tell

如果您在发送之前不需要检查邮件,则可以在之后添加或不添加发送说明。