OSX 10.11(El Capitan)上包含丰富内容的AppleScript电子邮件

时间:2016-05-19 05:51:10

标签: email applescript html-email osx-yosemite osx-elcapitan

我正在尝试通过AppleScript通过默认邮件客户端发送带样式的文本电子邮件。似乎新版本的OSX无法识别内部的HTML内容。 10.11(El Capitan)有没有解决办法?

10.10(优胜美地)的解决方案正常运行。

tell application "Mail"
    set theMessage to make new outgoing message with properties {subject:textSubject, visible:false}
    tell theMessage
        set html content to textBody
        repeat with i from 1 to count toNameList
            make new to recipient at theMessage with properties {name:item i of toNameList, address:item i of toAddressList}
        end repeat
        send
    end tell
end tell

0 个答案:

没有答案