AppleScript for Mail附件在Mojave beta 10中不起作用

时间:2018-09-05 10:18:23

标签: applescript macos-mojave

以下脚本在High Sierra中可以正常运行,但是无法将文件附加到Mojave中的邮件消息中。邮件标题,内容和收件人设置正确,但附件设置不正确。有什么想法吗?

set theAttachment to (choose file with prompt "Select file for attachment...")

tell application "Mail"

    set theMessage to make new outgoing message with properties {visible:true, subject:"File Attachment Test", content:"Some test content" & linefeed & linefeed}

    tell theMessage
        make new to recipient at end of to recipients with properties {name:"John Doe", address:"johndoe@domain.com"}
    end tell

    tell content of theMessage
        make new attachment with properties {file name:theAttachment} at after last paragraph
    end tell

end tell

0 个答案:

没有答案