我正在尝试编写一个脚本,将 Mail 中选定的电子邮件转发到新地址。 (我的“事物”应用地址)
我不完全理解 AppleScript,所以我试图从其他地方查看和复制代码片段。
到目前为止:
set msgFrom to "new_from_address@me.com"
set MsgRecipient to "add-to-things-@things.email"
tell application "Mail"
set TheMessages to the selection
repeat with current_Message in TheMessages
set fwd_Message to forward current_Message with opening window
tell fwd_Message
set sender of fwd_Message to msgFrom
set my_recipient to make new to recipient at end of to recipients with properties {address:MsgRecipient}
-- send fwd_Message
end tell
end repeat
end tell
这几乎可以工作,但不会用脚本中设置的“msgFrom”地址替换转发电子邮件中的“发件人”地址。它确实更改了地址,但更改为我帐户中列出的地址,而不是我指定的地址。谁能帮帮我。