我有用户通过 Outlook 发送邮件,该邮件的文本格式为富文本。我正在尝试创建脚本,让“catch-all”电子邮件地址拦截电子邮件,将其转换为纯文本,然后将其发送给用户。我搜索了一下,发现重定向功能已经起作用,但邮件正文仍然是富文本。我是否可以修改以下脚本来实现这一点:
告诉应用程序“邮件”
set AppleScript's text item delimiters to ""
set theRedirectRecipient to "[email protected]"
set theRedirectSender to "Case manager"
set theMessages to the selection
repeat with thisMessage in theMessages
tell application "Mail"
set theRedirectedEmail to redirect thisMessage
tell theRedirectedEmail
if subject of thisMessage is "" then
set subject of theRedirectedEmail to "Subject Was Empty"
end if
make new to recipient at beginning of to recipients with properties {address:theRedirectRecipient}
delete bcc recipients
delete cc recipients
end tell
set the sender of theRedirectedEmail to theRedirectSender
#delay 1
send theRedirectedEmail
end tell
end repeat
结束告诉