简体   繁体   English

使用Javascript发送之前显示电子邮件

[英]Display emails before sending with Javascript

I am trying to create a script that will open the default email client, fill in certain variables but still allow the user to make changes and send. 我正在尝试创建一个脚本,该脚本将打开默认的电子邮件客户端,填充某些变量,但仍允许用户进行更改并发送。 Right now my script will send the email (email.send) but I am looking for a way for the email to be displayed rather than sent. 现在,我的脚本将发送电子邮件(email.send),但是我正在寻找一种显示而不是发送电子邮件的方法。 Here is the code: 这是代码:

var email = new Email()
email.subject = item.PO_ID

email.to = [item.BUYER_EMAIL, "accounting@test.com", "user@test.com"]

email.body = "Test body"

email.send()

What do I change .send() to? 我将.send()更改.send()

Untested, but have you tried using using window.location() and sending the browser to something like: 未经测试,但您是否尝试过使用window.location()并将浏览器发送至以下内容:

mailto:accounting@test.com?subject=Test&body=Test Body

Replacing the email, subject and body using JS. 使用JS替换电子邮件,主题和正文。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM