【发布时间】:2021-03-09 04:41:39
【问题描述】:
我编写了一个小 Applescript 来通过 Outlook 发送带有附件的新消息。但它没有用,我不知道为什么。没有错误或其他东西。该邮件是在 Outlook 的草稿部分中创建的,但缺少附件。有人可以帮帮我吗?
这是脚本:
set mailBody to "<span>TEST</span>"
set mailAdress to text returned of (display dialog "Mail Adress" default answer "" buttons {"OK"} default button 1) as string
set whichFile to file
tell application "Finder" to set whichFile to selection
repeat with aFile in whichFile
tell application "Microsoft Outlook"
set filename to name of aFile
set theNewMessage to make new outgoing message with properties {subject:"TEST " & filename, content:mailBody}
make new recipient at theNewMessage with properties {email address:{address:mailAdress}}
set theAttachmentFile to aFile as POSIX file
make new attachment at the end of theNewMessage with properties {file:theAttachmentFile}
open theNewMessage
end tell
end repeat
提前问候和感谢
极速赛车
【问题讨论】:
标签: outlook applescript