如何在发送网格上添加发件人名称
下面的代码是我的SendGrid助手功能 目前,这就是从infogmail.com所包含的发件人名称“信息”。 。我想添加一个自定义名称。我已经阅读了文档,但我还没有看到解决问题的解决方案。我看到的所有解决方案都是为Python
const msg = {
to: email,
from: `${SENDER_EMAIL}`,
fromname: FROM_NAME,
subject: "Thanks for the Gift",
html: `${html(name, SENDER_EMAIL, SENDER_NAME)}`,
};
sgMail
.send(msg)
.then(() => {
console.log("Email sent");
})
.catch((error) => {
console.error(error);
});
};```
The code below is my sendgrid helper function
presently, this is what comes up as the sender name "info" which is conned from infogmail.com. . i would like to add a custom name. i have read the docs but i have not seen a solution to my problem. all the solutions i saw was for python
const msg = {
to: email,
from: `${SENDER_EMAIL}`,
fromname: FROM_NAME,
subject: "Thanks for the Gift",
html: `${html(name, SENDER_EMAIL, SENDER_NAME)}`,
};
sgMail
.send(msg)
.then(() => {
console.log("Email sent");
})
.catch((error) => {
console.error(error);
});
};```
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以这样:
You can in this way: