{"id":12633,"date":"2020-05-29T11:45:32","date_gmt":"2020-05-29T02:45:32","guid":{"rendered":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=12633"},"modified":"2026-04-16T10:50:26","modified_gmt":"2026-04-16T01:50:26","slug":"twilio-sendgrid%e3%81%a8node-js%e3%81%a7%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e4%b8%80%e6%96%89%e9%80%81%e4%bf%a1%e3%81%99%e3%82%8b3%e3%81%a4%e3%81%ae%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=12633","title":{"rendered":"Twilio SendGrid\u3068Node.js\u3067\u30e1\u30fc\u30eb\u3092\u4e00\u6589\u9001\u4fe1\u3059\u308b3\u3064\u306e\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-12634\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/LsoQq_YSI50vH_f9Ff1VU3gxq90DLeJ_X_wJUnXFS2-UdV.width-808.png\" alt=\"Twilio SendGrid\u3068Node.js\u3067\u30e1\u30fc\u30eb\u3092\u4e00\u6589\u9001\u4fe1\u3059\u308b3\u3064\u306e\u65b9\u6cd5\" width=\"100%\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/LsoQq_YSI50vH_f9Ff1VU3gxq90DLeJ_X_wJUnXFS2-UdV.width-808.png 808w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/LsoQq_YSI50vH_f9Ff1VU3gxq90DLeJ_X_wJUnXFS2-UdV.width-808-300x150.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/LsoQq_YSI50vH_f9Ff1VU3gxq90DLeJ_X_wJUnXFS2-UdV.width-808-768x384.png 768w\" sizes=\"(max-width: 808px) 100vw, 808px\" \/><\/p>\n<blockquote><p>\u3053\u306e\u8a18\u4e8b\u306f <a href=\"https:\/\/www.twilio.com\/blog\/sending-bulk-emails-3-ways-sendgrid-nodejs\" target=\"_blank\" rel=\"noopener\">Sending Bulk Emails 3 Ways With Twilio SendGrid And Node.js<\/a> \u306e\u6284\u8a33\u3067\u3059\u3002<\/p><\/blockquote>\n<p>\u30e1\u30fc\u30eb\u914d\u4fe1\u306e\u30e1\u30ea\u30c3\u30c8\u306e\u4e00\u3064\u306f\u3001\u4e00\u5ea6\u306b\u591a\u304f\u306e\u4eba\u305f\u3061\u3078\u60c5\u5831\u3092\u5c4a\u3051\u3089\u308c\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001SendGrid\u3067Node.js\u3092\u7528\u3044\u3066\u4e00\u6589\u914d\u4fe1\u3092\u884c\u3046\u65b9\u6cd5\u30923\u3064\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u7686\u3055\u3093\u304cNode.js\u3082\u4f7f\u3048\u308b\u30c9\u30fc\u30ca\u30c4\u5c4b\u306e\u5e97\u4e3b\u3060\u3063\u305f\u3068\u3057\u3066\u3001\u30e1\u30fc\u30eb\u914d\u4fe1\u3092\u5e0c\u671b\u3059\u308b\u304a\u5ba2\u3055\u3093\u306b\u30c9\u30fc\u30ca\u30c4\u306e\u713c\u304d\u4e0a\u304c\u308a\u3092\u77e5\u3089\u305b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u5fc5\u8981\u306a\u30c4\u30fc\u30eb<\/h3>\n<ul>\n<li><a href=\"https:\/\/nodejs.org\/en\/#download\" target=\"_blank\" rel=\"noopener\">Node.js\u304a\u3088\u3073npm<\/a><\/li>\n<li>SendGrid\u30a2\u30ab\u30a6\u30f3\u30c8\uff08\u3054\u767b\u9332\u306f<a href=\"https:\/\/sendgrid.kke.co.jp\/app?p=signup.index&#038;utm_source=sg&#038;utm_medium=web&#038;utm_campaign=blog\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u304b\u3089\uff09<\/li>\n<li>\u52d5\u4f5c\u78ba\u8a8d\u7528\u306e\u30e1\u30fc\u30eb\u30a2\u30ab\u30a6\u30f3\u30c8\uff08\u5c11\u306a\u304f\u3068\u30822\u3064\u3002\u7570\u306a\u308b<a href=\"https:\/\/www.google.com\/gmail\/about\/\" target=\"_blank\" rel=\"noopener\">Gmail<\/a>\u30a2\u30ab\u30a6\u30f3\u30c82\u3064\u3067\u3082\u826f\u3044\u3067\u3059\u3002\uff09<\/li>\n<\/ul>\n<p>\u6700\u521d\u306b\u3001SendGrid\u306e<a href=\"https:\/\/app.sendgrid.com\/settings\/api_keys\" target=\"_blank\" rel=\"noopener\">\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9<\/a>\u304b\u3089API\u30ad\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u300cbulk email\u300d\u3068\u3044\u3046\u540d\u524d\u3092\u3064\u3051\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-12635\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/O-_Xe18wvIDXMswwxuaaJ_RuomN9Q_5L6-uYYwIsbIyCJL.width-500.png\" alt=\"API\u30ad\u30fc\u306e\u4f5c\u6210\" width=\"100%\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/O-_Xe18wvIDXMswwxuaaJ_RuomN9Q_5L6-uYYwIsbIyCJL.width-500.png 500w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/O-_Xe18wvIDXMswwxuaaJ_RuomN9Q_5L6-uYYwIsbIyCJL.width-500-300x208.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u300cCreate &amp; View\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001API\u30ad\u30fc\u306e\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3092<span style=\"background-color: #d3d3d3;\">SENDGRID_API_KEY<\/span>\u3068\u3044\u3046\u540d\u524d\u3067<a href=\"https:\/\/www.twilio.com\/blog\/2017\/01\/how-to-set-environment-variables.html\" target=\"_blank\" rel=\"noopener\">\u74b0\u5883\u5909\u6570<\/a>\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u304b\u3089\u3001\u4e00\u5ea6\u753b\u9762\u3092\u9589\u3058\u308b\u3068API\u30ad\u30fc\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u65b0\u3057\u3044Node.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081<span style=\"background-color: #d3d3d3;\">npm init<\/span>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u5f8c\u3001<span style=\"background-color: #d3d3d3;\">npm install @sendgrid\/mail<\/span>\u3092\u5b9f\u884c\u3057\u3066SendGrid\u30d8\u30eb\u30d1\u30fc\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<span style=\"background-color: #d3d3d3;\">index.js<\/span>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308a\u3001\u597d\u304d\u306a\u30a8\u30c7\u30a3\u30bf\u3067\u958b\u304d\u307e\u3059\u3002<\/p>\n<h3>\u65b9\u6cd51\uff1asendMultiple<\/h3>\n<p>\u4e00\u6589\u914d\u4fe1\u3092\u884c\u3046\u306e\u306b\u6700\u3082\u624b\u3063\u53d6\u308a\u65e9\u3044\u306e\u306f\u3001\u5b9b\u5148\u30a2\u30c9\u30ec\u30b9\u306e\u914d\u5217\u3092<span style=\"background-color: #d3d3d3;\">to<\/span>\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u6307\u5b9a\u3057\u305f\u4e0a\u3067\u3001\u5358\u4e00\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5f15\u6570\u306b\u3057\u3066<span style=\"background-color: #d3d3d3;\">sendMultiple<\/span>\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092<span style=\"background-color: #d3d3d3;\">index.js<\/span>\u306b\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3057\u3066\u3001<span style=\"background-color: #d3d3d3;\">to<\/span>\u914d\u5217\u3092\u5b9b\u5148\u30a2\u30c9\u30ec\u30b9\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nconst sgMail = require(&#039;@sendgrid\/mail&#039;);\r\nsgMail.setApiKey(process.env.SENDGRID_API_KEY);\r\n\r\nconst msg = {\r\n  to: &#x5B;&#039;example1@mail.com&#039;, &#039;example2@mail.com&#039;], \/\/ replace these with your email addresses\r\n  from: &#039;Sadie Miller &lt;sadie@thebigdonut.party&gt;&#039;,\r\n  subject: &#039;\ud83c\udf69 Donuts, at the big donut \ud83c\udf69&#039;,\r\n  text: &#039;Fresh donuts are out of the oven. Get them while they\u2019re hot!&#039;,\r\n  html: &#039;&lt;p&gt;Fresh donuts are out of the oven. Get them while they\u2019re &lt;em&gt;hot!&lt;\/em&gt;&lt;\/p&gt;&#039;,\r\n};\r\n\r\nsgMail.sendMultiple(msg).then(() =&gt; {\r\n  console.log(&#039;emails sent successfully!&#039;);\r\n}).catch(error =&gt; {\r\n  console.log(error);\r\n});\r\n<\/pre>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067<span style=\"background-color: #d3d3d3;\">node index.js<\/span>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u4e0a\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30fc\u30eb\u304c\u53d7\u4fe1\u7bb1\u306b\u5c4a\u304f\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-12636\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/46E77Uwvt4shbrG6k5au1GJv7MjkcF1j22c0yqloVZryre.width-500.png\" alt=\"Donuts,at the big donut\" width=\"100%\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/46E77Uwvt4shbrG6k5au1GJv7MjkcF1j22c0yqloVZryre.width-500.png 500w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/46E77Uwvt4shbrG6k5au1GJv7MjkcF1j22c0yqloVZryre.width-500-300x114.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Web API\u306e\u4e00\u56de\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u9001\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u5b9b\u5148\u306e\u4e0a\u9650\u306f1000\u4ef6\u3067\u3059\u3002\u3082\u3057\u30c9\u30fc\u30ca\u30c4\u5c4b\u306e\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u30fb\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u30fb\u8010\u969c\u5bb3\u6027\u304cSendGrid\u306b\u5f15\u3051\u3092\u3068\u3089\u305a\u30011000\u3092\u8d85\u3048\u308b\u304a\u5ba2\u3055\u3093\u306b\u4e00\u5ea6\u306b\u30e1\u30fc\u30eb\u3092\u9001\u308a\u305f\u3044\u3068\u8a00\u3046\u306e\u306a\u3089\u3001\u8907\u6570\u56de\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><span style=\"background-color: #d3d3d3;\">sgMail.sendMultiple<\/span>\u3092\u4f7f\u7528\u3057\u3066\u9001\u4fe1\u3057\u305f\u3089\u3001\u53d7\u4fe1\u8005\u306f\u4ed6\u306e\u53d7\u4fe1\u8005\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u898b\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3082\u3057\u53d7\u4fe1\u8005\u304c\u4e92\u3044\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u78ba\u8a8d\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u304b\u3063\u305f\u3089\u3001\u4e0a\u306e\u30b3\u30fc\u30c9\u306e<span style=\"background-color: #d3d3d3;\">sgMail.sendMultiple<\/span>\u3092<span style=\"background-color: #d3d3d3;\">sgMail.send<\/span>\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u3068\u306f\u8a00\u3048\u3001<strong>\u3088\u307b\u3069\u306e\u7406\u7531\u304c\u306a\u3044\u9650\u308a\u306f\u3001\u4ed6\u306e\u53d7\u4fe1\u8005\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u898b\u3048\u308b\u3088\u3046\u306b\u3059\u3079\u304d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/p>\n<h3>\u65b9\u6cd52\uff1a\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba<\/h3>\n<p>\u3084\u308a\u624b\u306e\u30c9\u30fc\u30ca\u30c4\u5c4b\u5e97\u4e3b\u3067\u3042\u308b\u7686\u3055\u3093\u306f\u3001\u304a\u5ba2\u3055\u307e\u4e00\u4eba\u3072\u3068\u308a\u3078\u306e\u6c17\u9063\u3044\u3092\u6020\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u4e2d\u3067\u3001\u30b9\u30c6\u30a3\u30fc\u30d6\u30f3\u304c\u30d9\u30fc\u30b3\u30f3\u30c9\u30fc\u30ca\u30c4\u3092\u3053\u3088\u306a\u304f\u611b\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u3065\u304d\u307e\u3057\u305f\u3002<br \/>\npersonalizations\u3092\u4f7f\u3048\u3070\u5b9b\u5148\u3054\u3068\u306b\u30e1\u30fc\u30eb\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u304c\u53ef\u80fd\u306a\u306e\u3067\u3001\u304a\u5ba2\u3055\u3093\u306e\u597d\u304d\u306a\u30c9\u30fc\u30ca\u30c4\u3092\u30bf\u30a4\u30c8\u30eb\u306b\u5fcd\u3070\u305b\u3066\u6c17\u3092\u5f15\u304f\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><span style=\"background-color: #d3d3d3;\">index.js<\/span>\u306e\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306b\u5165\u308c\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nconst sgMail = require(&#039;@sendgrid\/mail&#039;);\r\nsgMail.setApiKey(process.env.SENDGRID_API_KEY);\r\n\r\nconst msg = {\r\n  personalizations: &#x5B;\r\n    {\r\n      to: &#039;example1@mail.com&#039;, \/\/ replace this with your email address\r\n      subject: &#039;Did somebody say BACON DONUTS?? \ud83e\udd53\ud83e\udd53\ud83e\udd53&#039;,\r\n    },\r\n    {\r\n      to: &#039;example2@mail.com&#039;, \/\/ replace this with your email address\r\n    }\r\n  ],\r\n  from: &#039;Sadie Miller &lt;sadie@thebigdonut.party&gt;&#039;,\r\n  subject: &#039;\ud83c\udf69 Donuts, at the big donut \ud83c\udf69&#039;,\r\n  text: &#039;Fresh donuts are out of the oven. Get them while they\u2019re hot!&#039;,\r\n  html: &#039;&lt;p&gt;Fresh donuts are out of the oven. Get them while they\u2019re &lt;em&gt;hot!&lt;\/em&gt;&lt;\/p&gt;&#039;,\r\n};\r\n\r\nsgMail.send(msg).then(() =&gt; {\r\n  console.log(&#039;emails sent successfully!&#039;);\r\n}).catch(error =&gt; {\r\n  console.log(error);\r\n});\r\n<\/pre>\n<p><span style=\"background-color: #d3d3d3;\">node index.js<\/span>\u30b3\u30de\u30f3\u30c9\u3067\u9001\u4fe1\u30c6\u30b9\u30c8\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-12637\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/r9pnWlm3FH2N2o0FhTN1K0jKQYbyBNLqqURYdrZ7RUeDkP.width-500.png\" alt=\"Did somebody say BACON DONUTS\" width=\"100%\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/r9pnWlm3FH2N2o0FhTN1K0jKQYbyBNLqqURYdrZ7RUeDkP.width-500.png 500w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/r9pnWlm3FH2N2o0FhTN1K0jKQYbyBNLqqURYdrZ7RUeDkP.width-500-300x99.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u30bf\u30a4\u30c8\u30eb\u3092\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3057\u3066\u3044\u306a\u3044\u5b9b\u5148\u306b\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30bf\u30a4\u30c8\u30eb\u3067\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002\u4e00\u901a\u306f\u30d9\u30fc\u30b3\u30f3\u30c9\u30fc\u30ca\u30c4\u3001\u3082\u3046\u4e00\u901a\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30bf\u30a4\u30c8\u30eb\u306e\u30e1\u30fc\u30eb\u304c\u5c4a\u3044\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>personalizations API\u3067\u306f\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u3048\u308b\u4ee5\u5916\u306b\u3082\u3044\u308d\u3044\u308d\u306a\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u53ef\u80fd\u306a<a href=\"https:\/\/sendgrid.kke.co.jp\/docs\/API_Reference\/Web_API_v3\/Mail\/index.html\" target=\"_blank\" rel=\"noopener\">\u5c5e\u6027<\/a>\u3092\u6319\u3052\u307e\u3059\u3002<\/p>\n<ul>\n<li>subject &#8211; \u30e1\u30fc\u30eb\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u5909\u3048\u308b<\/li>\n<li>headers &#8211; \u30e1\u30fc\u30eb\u306e\u30d8\u30c3\u30c0\u3092\u5909\u3048\u308b<\/li>\n<li>substitutions &#8211; \u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u3092\u6307\u5b9a\u3057\u3001\u30e1\u30fc\u30eb\u306e\u30bf\u30a4\u30c8\u30eb\u3084\u30dc\u30c7\u30a3\u5185\u306b\u3042\u308b\u30ad\u30fc\u3092\u5024\u306b\u5909\u63db\u3059\u308b<\/li>\n<li>custom_args &#8211; substitutions\u306e\u7f6e\u63db\u3092\u53d7\u3051\u306a\u3044\u30e1\u30fc\u30eb\u3054\u3068\u306e\u30ab\u30b9\u30bf\u30e0\u5024\u3092\u6307\u5b9a\u3059\u308b<\/li>\n<li>send_at &#8211; \u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u6642\u523b\u3092UNIX\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3067\u6307\u5b9a\u3059\u308b<\/li>\n<\/ul>\n<h3>\u65b9\u6cd53\uff1a\u30e1\u30c3\u30bb\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u914d\u5217<\/h3>\n<p>\u8907\u6570\u306e\u5b9b\u5148\u305d\u308c\u305e\u308c\u306b\u7570\u306a\u308b\u4ef6\u540d\u3084\u672c\u6587\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b\u5834\u5408\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u914d\u5217\u304c\u6709\u52b9\u3067\u3059\u3002<span style=\"background-color: #d3d3d3;\">.send<\/span>\u95a2\u6570\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u914d\u5217\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nconst sgMail = require(&#039;@sendgrid\/mail&#039;);\r\nsgMail.setApiKey(process.env.SENDGRID_API_KEY);\r\n\r\nconst messages = &#x5B;\r\n  {\r\n    to: &#039;example1@mail.com&#039;, \/\/ replace this with your email address\r\n    from: &#039;Sadie Miller &lt;sadie@thebigdonut.party&gt;&#039;,\r\n    subject: &#039;We miss you \ud83d\ude2d&#039;,\r\n    text: &#039;Get 10% off with coupon code NOMNOMNOM&#039;,\r\n    html: &#039;&lt;p&gt;Get 10% off with coupon code &lt;b&gt;NOMNOMNOM&lt;\/b&gt;&lt;\/p&gt;&#039;,\r\n  },\r\n  {\r\n    to: &#039;example2@mail.com&#039;, \/\/ replace this with your email address\r\n    from: &#039;Lars Barriga &lt;lars@thebigdonut.party&gt;&#039;,\r\n    subject: &#039;NEW! Ube rolls \ud83d\ude3b&#039;,\r\n    text: &#039;In addition to donuts, we are now selling ube rolls.&#039;,\r\n    html: &#039;&lt;p&gt;In addition to donuts, we are now selling ube rolls.&lt;\/p&gt;&#039;,\r\n  },\r\n];\r\n\r\nsgMail.send(messages).then(() =&gt; {\r\n  console.log(&#039;emails sent successfully!&#039;);\r\n}).catch(error =&gt; {\r\n  console.log(error);\r\n});\r\n<\/pre>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u305d\u308c\u305e\u308c\u306e\u5b9b\u5148\u306b\u4ee5\u4e0b\u306e\u30e1\u30fc\u30eb\u304c\u5c4a\u304f\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-12639\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/v9fRwQmPGAuxjS-lBt-notO5UbU_ErbDJSIlmuOTBB-Yn.width-500.png\" alt=\"We miss you\" width=\"100%\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/v9fRwQmPGAuxjS-lBt-notO5UbU_ErbDJSIlmuOTBB-Yn.width-500.png 500w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/v9fRwQmPGAuxjS-lBt-notO5UbU_ErbDJSIlmuOTBB-Yn.width-500-300x143.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-12638\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/9jH_oSjKZ_L-aUiT5u92_AdBezyCAOsYHidmGGFTsHQ0LL.width-500.png\" alt=\"NEW! Ube rolls\" width=\"100%\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/9jH_oSjKZ_L-aUiT5u92_AdBezyCAOsYHidmGGFTsHQ0LL.width-500.png 500w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/05\/9jH_oSjKZ_L-aUiT5u92_AdBezyCAOsYHidmGGFTsHQ0LL.width-500-300x148.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u4eca\u65e5\u3084\u3063\u305f\u3053\u3068\u3092\u632f\u308a\u8fd4\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>\u8907\u6570\u306e\u5b9b\u5148\u306b\u4e00\u6589\u9001\u4fe1\u3059\u308b<\/li>\n<li>personalizations\u3092\u7528\u3044\u3066\u3001\u8907\u6570\u306e\u5b9b\u5148\u306b\u5bfe\u3057\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u30e1\u30fc\u30eb\u3092\u9001\u308b<\/li>\n<li>\u30e1\u30c3\u30bb\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u914d\u5217\u3092\u7528\u3044\u3066\u3001\u8907\u6570\u306e\u5b9b\u5148\u306b\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u30e1\u30fc\u30eb\u3092\u9001\u308b<\/li>\n<\/ul>\n<p>\u3088\u304f\u3067\u304d\u307e\u3057\u305f\uff01\u81ea\u5206\u306b\u3054\u8912\u7f8e\u3092\u3042\u3052\u307e\u3057\u3087\u3046\ud83c\udf89 \u3048\u3001\u30c9\u30fc\u30ca\u30c4\u304c\u98df\u3079\u305f\u304f\u306a\u3063\u305f\u3063\u3066\uff1f\u305d\u308c\u306f\u79c1\u306e\u305b\u3044\u3067\u306f\u3042\u308a\u307e\u305b\u3093\ud83c\udf69<\/p>\n<p>SendGrid\u306eAPI\u306f\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u306a\u3044\u307b\u3069\u6a5f\u80fd\u304c\u5145\u5b9f\u3057\u3066\u3044\u3066\u3001\u30d6\u30ed\u30b0\u8a18\u4e8b\u3072\u3068\u3064\u306b\u5168\u3066\u3092\u8a70\u3081\u8fbc\u3080\u306e\u306f\u5230\u5e95\u7121\u7406\u3067\u3059\u3002\u6700\u65b0\u306e\u60c5\u5831\u306f\u3001<a href=\"https:\/\/www.twilio.com\/docs\/sendgrid\/for-developers\/sending-email\/api-getting-started\" target=\"_blank\" rel=\"noopener\">\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<a href=\"https:\/\/github.com\/sendgrid\/sendgrid-nodejs\/\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>\u3067\u516c\u958b\u3057\u3066\u3044\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e<a href=\"https:\/\/www.npmjs.com\/package\/@sendgrid\/mail\" target=\"_blank\" rel=\"noopener\">Node.js\u30e9\u30a4\u30d6\u30e9\u30ea<\/a>\u3082\u304a\u898b\u9003\u3057\u306a\u304f\u3002<\/p>\n<p>\u6700\u5f8c\u307e\u3067\u304a\u8aad\u307f\u3044\u305f\u3060\u304d\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\u3002Happy Emailing!\ud83d\udce7<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f Sending Bulk Emails 3 Ways With Twilio SendGrid And Node.js \u306e\u6284\u8a33\u3067\u3059\u3002 \u30e1\u30fc\u30eb\u914d\u4fe1\u306e\u30e1\u30ea\u30c3\u30c8\u306e\u4e00\u3064\u306f\u3001\u4e00\u5ea6\u306b\u591a\u304f\u306e\u4eba\u305f\u3061\u3078\u60c5\u5831\u3092\u5c4a\u3051\u3089\u308c\u308b\u3053\u3068\u3067\u3059 <a class=\"read-more\" href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=12633\">&#8230;\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":12634,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11,8],"tags":[],"class_list":["post-12633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical","category-product"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12633"}],"version-history":[{"count":17,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12633\/revisions"}],"predecessor-version":[{"id":20698,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12633\/revisions\/20698"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/media\/12634"}],"wp:attachment":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}