如何解决Gmail不会加载nodemailer以html格式发送的图像
通常,我想知道我的客户是否打开了我之前发送的邮件,因此应该执行一系列任务
我的邮递区号是
var nodemailer = require("nodemailer");
var transporter = nodemailer.createTransport({
service: "gmail",auth: {
user: "example@gmail.com",pass: "password",},});
const adress = "http://localhost:3000/example/image/Anveshweb%20development.png";
var mailOptions = {
from: "from@gmail.com",to: "to@gmail.com",subject: "Sending Email using Node.js",text: "That was easy!",html: `<h1>Welcome</h1><p>That was easy!</p><img src=${adress} alt='hello' />`,};
transporter.sendMail(mailOptions,function(error,info) {
if (error) {
console.log(error);
} else {
console.log("Email sent: " + info.response);
}
});
在我的服务器上,我根据请求提供了透明像素
var buf = new Buffer([
0x47,0x49,0x46,0x38,0x39,0x61,0x01,0x00,0x80,0xff,0x2c,0x02,0x44,0x3b]);
gmail发出
GET https://ci4.googleusercontent.com/proxy/LKrNqBK4M96BJZwT3Kj_-glJlHpSg1I33wKM5dqygwg7Emy7kijJWgGPs_uIVfnPUN8Fa7ERW9m1DvX4h6qP792V8XVJ9hHis8Qdbdc=s0-d-e1-ft 404
请让我知道是否有解决方案...谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。