Sendgrid-nodejs: フィールドへはプレーンメールのみを受け入れます

作成日 2019年03月13日  ·  3コメント  ·  ソース: sendgrid/sendgrid-nodejs

問題の概要

'@ sendgrid / mail'を使用して電子メールを送信する場合、 'to'フィールドはプレーンな電子メールアドレスのみを受け入れ、名前/電子メール形式は受け入れません(例:{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バージョン:マスター(最新のコミット:[コミット番号])
  • Node.jsバージョン:4.1.2
unknown or a waiting for feedback question

全てのコメント3件

こんにちは@agostonbonomi

ここでは、電子メールのフォーマットのサポートされている方法があります。

それが役に立ったら教えてください。

ありがとう!

敬具、

エルマー

ねえ@thinkingserious 、これをありがとう。 私はドキュメントでこれを見逃しました、うまくいきます:)

フォローアップ@agostonbonomiをありがとう!

このページは役に立ちましたか?
0 / 5 - 0 評価

関連する問題

thidasapankaja picture thidasapankaja  ·  4コメント

TobiahRex picture TobiahRex  ·  3コメント

thinkingserious picture thinkingserious  ·  4コメント

Loriot-n picture Loriot-n  ·  4コメント

thinkingserious picture thinkingserious  ·  4コメント