我想发送和发送电子邮件与苹果脚本这样做:
hi,
here is the attachment file
[The attachment.pdf]
As you can see, it is a good attachment
Thanks
Bye
我知道如何使用applescript在邮件末尾发送带附件的电子邮件,但不是两句话之间。
我尝试过类似的东西,但它不起作用:
set _attachment to "Macintosh HD:Users:usr:Desktop:Form.pdf"
set msg to make new outgoing message with properties {visible:true, subject:"Here it is", content: "hi,
here is the attachment file"}
tell msg to make new attachment with properties {file name:_attachment as alias}
tell msg to add "As you can see, it is a good attachment
Thanks
Bye" as content
谢谢大家的支持。
坝
答案 0 :(得分:1)
假设我们正在讨论Apple Mail
,您可以在邮件内容中指定附件的位置。
身体文本立即传递,然后插入附件。
set _attachment to (path to desktop as text) & "Form.pdf"
tell application "Mail"
set msg to make new outgoing message with properties {visible:true, subject:"Here it is", content:"hi,
here is the attachment file
As you can see, it is a good attachment
Thanks
Bye"}
tell content of msg to make new attachment with properties {file name:_attachment as alias} at after third paragraph
end tell