Sendgrid-nodejs: 收件人字段只接受普通电子​​邮件

创建于 2019-03-13  ·  3评论  ·  资料来源: sendgrid/sendgrid-nodejs

问题摘要

使用“@sendgrid/mail”发送任何电子邮件时,“收件人”字段仅接受普通电子​​邮件地址,不接受姓名/电子邮件格式(例如:{name:'John Doe', email:'[email protected]'} )。

重现步骤

const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const msg = {
  to: { email:'[email protected]', name: 'John Doe' },
  from: '[email protected]',
  subject: 'Sending with SendGrid is Fun',
  text: 'and easy to do anywhere, even with Node.js',
  html: '<strong>and easy to do anywhere, even with Node.js</strong>',
};
sgMail.send(msg);

技术细节:

  • sendgrid-nodejs 版本:master(最新提交:[提交编号])
  • Node.js 版本:4.1.2
unknown or a waiting for feedback question

所有3条评论

你好@agostonbonomi

以下是支持的电子邮件格式设置方法。

如果这有帮助,请告诉我。

谢谢!

最诚挚的问候,

埃尔默

@thinkingserious ,谢谢你。 我在文档中错过了这个,工作正常:)

感谢跟进@agostonbonomi!

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

nicoasp picture nicoasp  ·  3评论

umarhussain15 picture umarhussain15  ·  3评论

polkhovsky picture polkhovsky  ·  3评论

wooyah picture wooyah  ·  4评论

thinkingserious picture thinkingserious  ·  4评论