我正试图通过Mail.app从Cocoa应用程序发送html电子邮件.我想在Mail.app中打开新邮件,包括主题,收件人,并添加带有链接和其他内容的HTML Body.但找不到这样做的方法.我已经尝试过Scripting Bridge,但MailOutgoingMessage类没有内容类型我可以用纯文本添加内容.
尝试过AppleScript,如下所示:
set htmlContent to read "/Path/index.html"
set recipientList to {"mail@mail.com"}
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:"qwerty", visible:true}
tell newMessage
make new to recipient at end of to recipients with properties {address:"mail@s.com"}
set html content to htmlContent
--send
end tell
end tell
Run Code Online (Sandbox Code Playgroud)
这段代码发送电子邮件与html,只有我正在改变 - 发送.但是我需要在用户做出一些更改之后发送信件.
我有用于PDF预览的iframe和大量的base64数据(超过10mb).
<iframe src="" type="application/pdf"></iframe>'
Run Code Online (Sandbox Code Playgroud)
我该如何使用这些数据?当我尝试设置数据时:
$("iframe").attr("src", data);
Run Code Online (Sandbox Code Playgroud)
有些浏览器崩溃了.
我没有src链接.这个数据由ajax收到.有什么建议?