我这个在网上找的,填完了也用不了,不知道为什么,能帮忙解答一下吗?
写个按钮,调用这个函数
function sendEmail() {
Email.send({
Host: "smtp.gmail.com",
Username: "sender@email_address.com",
Password: "Enter your password",
To: 'receiver@email_address.com',
From: "sender@email_address.com",
Subject: "Sending Email using javascript",
Body: "Well that was easy!!",
Attachments: [
{
name: "File_Name_with_Extension",
path: "Full Path of the file"
}]
})
.then(function (message) {
alert("Mail has been sent successfully")
});
}
一般都是 后端实现,前端只把 发送内容 ,发送的邮箱,发送 人邮箱等参数传过去。后端一般 也是调用的 第三方的api ,而且大概率要收费