通过AppleScript从Mac号码发送邮件



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

I.e. in the first table I have:
subject: textfield
value1: dropdown
value2: dropdown
person: John Doe <john@doe.com>
Second table generates a mail message from table1 values:
Subject of mail: $subject
Hi, this is a request for $subject with properties $value1 , $value2. Responsible for your request is $person.

现在,我把一条信息复制/粘贴到邮件中,并亲手输入主题/人。有人能帮我做一个应用程序描述吗?我会打电话给它,即从脚本菜单栏输入数字,它会创建一个消息/+收件人&主题从数字值?

也许可以为合成邮件提取特定的信纸?

我不使用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

如果您不需要在发送前检查邮件,您可以在发送后添加或不添加发送指示。

最新更新