{"id":12694,"date":"2020-06-16T11:40:35","date_gmt":"2020-06-16T02:40:35","guid":{"rendered":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=12694"},"modified":"2026-04-13T16:21:16","modified_gmt":"2026-04-13T07:21:16","slug":"twilio-sendgrid%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6python-django%e3%81%a7%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e9%80%81%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=12694","title":{"rendered":"Twilio SendGrid\u3092\u4f7f\u3063\u3066Python Django\u3067\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/BlQPo2wedIb4gKCbmdTqVhsEwz_a55PfqucUTAWMj1acyv.width-808.png\" alt=\"Twilio SendGrid\u3092\u4f7f\u3063\u3066Python Django\u3067\u30e1\u30fc\u30eb\u3092\u9001\u308b\u65b9\u6cd5\" width=\"100%\" class=\"aligncenter size-full wp-image-12695\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/BlQPo2wedIb4gKCbmdTqVhsEwz_a55PfqucUTAWMj1acyv.width-808.png 808w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/BlQPo2wedIb4gKCbmdTqVhsEwz_a55PfqucUTAWMj1acyv.width-808-300x150.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/BlQPo2wedIb4gKCbmdTqVhsEwz_a55PfqucUTAWMj1acyv.width-808-768x384.png 768w\" sizes=\"(max-width: 808px) 100vw, 808px\" \/><\/p>\n<blockquote>\n<p>\u3053\u306e\u8a18\u4e8b\u306f <a href=\"https:\/\/www.twilio.com\/blog\/using-twilio-sendgrid-send-emails-python-django\" target=\"_blank\">Using Twilio SendGrid To Send Emails from Python Django Applications<\/a> \u306e\u6284\u8a33\u3067\u3059\u3002<\/p>\n<\/blockquote>\n<p>Web\u30a2\u30d7\u30ea\u306b\u30e1\u30fc\u30eb\u9001\u4fe1\u6a5f\u80fd\u3092\u3069\u3046\u7d44\u307f\u8fbc\u3080\u304b\u306f\u5e38\u306b\u5384\u4ecb\u306a\u554f\u984c\u3067\u3059\u3002\u81ea\u5206\u81ea\u8eab\u3067\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3092\u7528\u610f\u3057\u7ba1\u7406\u3059\u308b\u306e\u304b\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e1\u30fc\u30eb\u914d\u4fe1\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3046\u306e\u304b\u2026\u2026\u3002\u30e1\u30fc\u30eb\u914d\u4fe1\u91cf\u3084\u4e88\u7b97\u3001Web\u30a2\u30d7\u30ea\u306b\u3069\u3093\u306a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u7528\u3044\u308b\u304b\u306a\u3069\u69d8\u3005\u306a\u8981\u56e0\u306b\u5de6\u53f3\u3055\u308c\u307e\u3059\u304c\u3001\u30e1\u30fc\u30eb\u914d\u4fe1\u30b5\u30fc\u30d3\u30b9\u306e\u30b7\u30f3\u30d7\u30eb\u3055\u304c\u597d\u307e\u308c\u308b\u5834\u5408\u304c\u591a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u77ed\u3044\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308b<a href=\"https:\/\/www.djangoproject.com\/\" rel=\"noopener\" target=\"_blank\">Django<\/a>\u3092\u7528\u3044\u3066\u3001Twilio SendGrid\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>\u5fc5\u8981\u306a\u30c4\u30fc\u30eb<\/h3>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u306f\u4ee5\u4e0b\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<ul>\n<li>Python 3: \u304a\u4f7f\u3044\u306eOS\u306b\u3042\u3089\u304b\u3058\u3081\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001<a href=\"http:\/\/python.org\" rel=\"noopener\" target=\"_blank\">python.org<\/a>\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/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<\/ul>\n<h3>SendGrid\u306e\u8a2d\u5b9a\u3092\u884c\u3046<\/h3>\n<p>SendGrid\u304b\u3089\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u524d\u306b\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8a8d\u8a3c\u60c5\u5831\u3068\u3057\u3066\u7528\u3044\u308bAPI\u30ad\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30a2\u30ab\u30a6\u30f3\u30c8\u306b<a href=\"https:\/\/sendgrid.kke.co.jp\/app?p=login.index\" rel=\"noopener\" target=\"_blank\">\u30ed\u30b0\u30a4\u30f3<\/a>\u3057\u305f\u3089\u3001\u5de6\u5074\u306e\u30e1\u30cb\u30e5\u30fc\u306e\u201cSettings\u201d\u304b\u3089\u201c<a href=\"https:\/\/app.sendgrid.com\/settings\/api_keys\" rel=\"noopener\" target=\"_blank\">API Keys<\/a>\u201d\u3092\u9078\u3073\u3001\u201cCreate API Key\u201d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/zGPl_l4fzBkTkgm0mC9aaQE9E1p_nR0_Vx1th4jNxmbDLY.width-500.png\" alt=\"Create API Key\" width=\"80%\" class=\"aligncenter size-full wp-image-12697\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/zGPl_l4fzBkTkgm0mC9aaQE9E1p_nR0_Vx1th4jNxmbDLY.width-500.png 500w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/zGPl_l4fzBkTkgm0mC9aaQE9E1p_nR0_Vx1th4jNxmbDLY.width-500-300x211.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>API\u30ad\u30fc\u306b\u306f\u308f\u304b\u308a\u3084\u3059\u3044\u540d\u524d\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306fDjango\u3068\u3044\u3046\u540d\u524d\u306b\u3057\u307e\u3059\u3002Permissions\u306b\u201cFull Access\u201d\u3092\u9078\u3076\u3053\u3068\u3067\u3001\u30e1\u30fc\u30eb\u9001\u4fe1\u306b\u5fc5\u8981\u306a\u5168\u3066\u306e\u6a5f\u80fd\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u7279\u5b9a\u306e\u6a29\u9650\u3060\u3051\u6301\u3064API\u30ad\u30fc\u3092\u4f5c\u6210\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001\u201cRestricted Access\u201d\u3092\u9078\u3093\u3067\u5fc5\u8981\u306a\u6a29\u9650\u3092\u4e0e\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u201cCreate &#038; View\u201d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308c\u3070\u3001API\u30ad\u30fc\u306e\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u6587\u5b57\u5217\u306f\u4e00\u5ea6\u3057\u304b\u8868\u793a\u3067\u304d\u306a\u3044\u306e\u3067\u3001\u3042\u3068\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u3066\u30bb\u30ad\u30e5\u30a2\u306a\u5834\u6240\u306b\u30da\u30fc\u30b9\u30c8\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\u30ad\u30fc\u3092\u4fdd\u5b58\u3057\u305f\u3089\u3001\u201cDone\u201d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<h3>Python\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b<\/h3>\n<p>\u305d\u308c\u3067\u306f\u3001Django\u30a2\u30d7\u30ea\u3067\u306e\u30e1\u30fc\u30eb\u9001\u4fe1\u65b9\u6cd5\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002twilio-sendgrid-tests\u306e\u3088\u3046\u306a\u540d\u524d\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e\u4e2d\u306b\u65b0\u3057\u304fPython\u306e\u4eee\u60f3\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>Mac\u3082\u3057\u304f\u306fUnix\u30e6\u30fc\u30b6\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmkdir twilio-sendgrid-tests\ncd twilio-sendgrid-tests\npython3 -m venv venv\nsource venv\/bin\/activate\n<\/pre>\n<p>Windows\u30e6\u30fc\u30b6\u306e\u5834\u5408\u3001\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3084PowerShell\u306e\u753b\u9762\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmd twilio-sendgrid-tests\ncd twilio-sendgrid-tests\npython -m venv venv\nvenv\\Scripts\\activate\n<\/pre>\n<p>Python\u306e\u4eee\u60f3\u74b0\u5883\u304c\u4f5c\u6210\u30fb\u6709\u52b9\u5316\u3055\u308c\u308b\u3068\u3001\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u5148\u982d\u306b(venv)\u3068\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306b\u4f5c\u3063\u305f\u4eee\u60f3\u74b0\u5883\u4e0a\u306bdjango\u3068python-dotenv\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n(venv) $ pip install django python-dotenv\n<\/pre>\n<h3>Django\u30a2\u30d7\u30ea\u3092\u4f5c\u308b<\/h3>\n<p>\u6700\u521d\u306eDjango\u30a2\u30d7\u30ea\u3092\u4eca\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u308a\u307e\u3057\u3087\u3046\u3002\u3053\u3053\u3067\u306f\u201demails\u201d\u3068\u540d\u524d\u3092\u3064\u3051\u307e\u3059\u304c\u3001\u597d\u304d\u306a\u540d\u524d\u3067\u69cb\u3044\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n(venv) $ django-admin startproject emails\n(venv) $ cd emails\n<\/pre>\n<p>Twilio SendGrid\u3067\u306fSMTP\u30b5\u30fc\u30d0\u306b\u63a5\u7d9a\u3057\u3066\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u3042\u308a\u304c\u305f\u3044\u3053\u3068\u306bDjango\u3082SMTP\u3092\u7528\u3044\u305f\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002Django\u3092\u4f7f\u3063\u3066SendGrid\u7d4c\u7531\u3067\u30e1\u30fc\u30eb\u3092\u9001\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u5909\u6570\u3092<span style=\"background-color:#d3d3d3\">settings.py<\/span>\u3068\u3044\u3046Python\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u79c1\u306e\u5834\u5408\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306femails\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306b\u7f6e\u304d\u307e\u3057\u305f\u304c\u3001Django\u30a2\u30d7\u30ea\u306e\u540d\u524d\u306b\u3088\u3063\u3066\u30d5\u30a1\u30a4\u30eb\u304c\u304a\u304b\u308c\u308b\u5834\u6240\u306e\u540d\u524d\u306f\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# Twilio SendGrid\nEMAIL_HOST = &#039;smtp.sendgrid.net&#039;\nEMAIL_PORT = 587\nEMAIL_USE_TLS = True\nEMAIL_HOST_USER = &#039;apikey&#039;\nEMAIL_HOST_PASSWORD = os.environ.get(&#039;SENDGRID_API_KEY&#039;)\n<\/pre>\n<p>\u4e0a\u3067\u306f\u3001SendGrid\u306eSMTP\u3092\u7528\u3044\u3066\u9001\u4fe1\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u4ee5\u4e0b\u306e\u9805\u76ee\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3068\u3057\u3066<span style=\"background-color:#d3d3d3\">smtp.sendgrid.net<\/span>\u3092\u6307\u5b9a<\/li>\n<li>\u30dd\u30fc\u30c8\u756a\u53f7\u3068\u3057\u3066587\u3092\u6307\u5b9a\uff0825\u756a\u3067\u3082\u53ef\uff09<\/li>\n<li>TLS\u901a\u4fe1\u3092\u6709\u52b9\u5316<\/li>\n<li>\u8a8d\u8a3c\u60c5\u5831\u3068\u3057\u3066\u3001\u30e6\u30fc\u30b6\u540d\u306b<span style=\"background-color:#d3d3d3\">apikey<\/span>\uff08\u5168\u3066\u306eSendGrid\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u5171\u901a\uff09\u3092\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u5148\u307b\u3069\u4f5c\u6210\u3057\u305fAPI\u30ad\u30fc\u3092\u6307\u5b9a<\/li>\n<\/ul>\n<p>\u8a8d\u8a3c\u60c5\u5831\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u9855\u306b\u66f8\u304f\u306e\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u597d\u307e\u3057\u304f\u306a\u3044\u305f\u3081\u3001OS\u4e0a\u306bAPI\u30ad\u30fc\u3092<span style=\"background-color:#d3d3d3\">SENDGRID_API_KEY<\/span>\u3068\u3044\u3046\u74b0\u5883\u5909\u6570\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3001\u305d\u308c\u3092\u547c\u3073\u51fa\u3059\u5f62\u306b\u3057\u307e\u3059\u3002\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001<span style=\"background-color:#d3d3d3\">.env<\/span>\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3057\u3066\u3082\u826f\u3044\u3067\u3059\u3002Django\u306e\u6700\u4e0a\u4f4d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b<span style=\"background-color:#d3d3d3\">.env<\/span>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\uff08\u5148\u982d\u306e\u30c9\u30c3\u30c8\u3092\u5fd8\u308c\u305a\u306b\uff09\u3092\u4f5c\u308a\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\nSENDGRID_API_KEY=&#039;&lt;your-sendgrid-api-key&gt;&#039;\n<\/pre>\n<p>Django\u306f<span style=\"background-color:#d3d3d3\">.env<\/span>\u30d5\u30a1\u30a4\u30eb\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u8aad\u307f\u8fbc\u3093\u3067\u304f\u308c\u306a\u3044\u306e\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\u6642\u306b\u3053\u306e\u74b0\u5883\u5909\u6570\u3092\u8aad\u307f\u8fbc\u3080\u3088\u3046\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<span style=\"background-color:#d3d3d3\">settings.py<\/span>\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306b\u3001\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom dotenv import load_dotenv\nload_dotenv()\n<\/pre>\n<h3>\u30e1\u30fc\u30eb\u3092\u9001\u308b<\/h3>\n<p>\u305d\u308c\u3067\u306f\u3001\u81ea\u5206\u81ea\u8eab\u306b\u5411\u3051\u3066\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3057\u3087\u3046\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066Python\u30b7\u30a7\u30eb\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n(venv) $ python manage.py shell\n<\/pre>\n<p><span style=\"background-color:#d3d3d3\">manage.py shell<\/span> \u3092\u3064\u3051\u3066Python\u30b7\u30a7\u30eb\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u3067\u3001\u4e0a\u3067\u8ffd\u52a0\u3057\u305f\u8a2d\u5b9a\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u72b6\u614b\u3067Django\u30a2\u30d7\u30ea\u304c\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001Django\u306e <span style=\"background-color:#d3d3d3\">send_mail()<\/span> \u95a2\u6570\u3092\u4f7f\u3063\u3066\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\u3092\u9001\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom django.core.mail import send_mail\nsend_mail(&#039;Example Subject&#039;, &#039;Example message&#039;, &#039;from@example.com&#039;, &#x5B;&#039;to@example.com&#039;])\n<\/pre>\n<p><span style=\"background-color:#d3d3d3\">send_mail()<\/span> \u95a2\u6570\u3067\u6307\u5b9a\u3057\u3066\u3044\u308b\u5f15\u6570\u306f\u305d\u308c\u305e\u308c\u30e1\u30fc\u30eb\u306e\u4ef6\u540d\u3001\u672c\u6587\u3001\u9001\u4fe1\u8005\u3001\u5b9b\u5148\u30ea\u30b9\u30c8\u3067\u3059\u3002\u9001\u4fe1\u8005\u3001\u5b9b\u5148\u30ea\u30b9\u30c8\u3092\u81ea\u5206\u81ea\u8eab\u306e\u3082\u306e\u306b\u7f6e\u304d\u63db\u3048\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4f55\u4e8b\u3082\u554f\u984c\u306a\u3051\u308c\u3070\u3001\u6570\u79d2\u306e\u3046\u3061\u306b\u53d7\u4fe1\u7bb1\u306b\u30e1\u30fc\u30eb\u304c\u5c4a\u304f\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/3j4RecshreChQ50xSbF11aLxOBf3cftVLYEX9motfYwmbq.width-500.png\" alt=\"\u53d7\u4fe1\u30dc\u30c3\u30af\u30b9\" width=\"80%\" class=\"noshadow aligncenter size-full wp-image-12699\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/3j4RecshreChQ50xSbF11aLxOBf3cftVLYEX9motfYwmbq.width-500.png 500w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2020\/06\/3j4RecshreChQ50xSbF11aLxOBf3cftVLYEX9motfYwmbq.width-500-300x222.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u3053\u308c\u3067\u30b7\u30f3\u30d7\u30eb\u306a\u30e1\u30fc\u30eb\u304c\u9001\u4fe1\u3067\u304d\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u305f\u306e\u3067\u3001<span style=\"background-color:#d3d3d3\">send_mail()<\/span> \u95a2\u6570\u3084<span style=\"background-color:#d3d3d3\">EmailMessage<\/span>\u30af\u30e9\u30b9\u3092\u7d44\u307f\u8fbc\u3093\u3067Django\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002Django\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u63d0\u4f9b\u3055\u308c\u308b\u30e1\u30fc\u30eb\u306e\u5168\u3066\u306e\u6a5f\u80fd\u304cTwilio SendGrid\u3092\u901a\u3057\u3066\u5b9f\u884c\u3067\u304d\u307e\u3059\uff01<\/p>\n<h3>\u30e1\u30fc\u30eb\u304c\u5c4a\u304b\u306a\u304b\u3063\u305f\u3089<\/h3>\n<p>\u554f\u984c\u306a\u304f\u30e1\u30fc\u30eb\u9001\u4fe1\u304c\u6210\u529f\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u9858\u3044\u307e\u3059\u304c\u3001\u5c4a\u304b\u306a\u3044\u30b1\u30fc\u30b9\u3082\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002SendGrid\u306f\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u975e\u540c\u671f\u7684\u306b\u884c\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u307b\u3068\u3093\u3069\u306e\u554f\u984c\u306f\u9001\u4fe1\u6307\u793a\u3092\u5b8c\u4e86\u3057\u305f\u5f8c\u306b\u767a\u751f\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e1\u30fc\u30eb\u9001\u4fe1\u8005\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u9001\u4fe1\u30a8\u30e9\u30fc\u306e\u767a\u751f\u304c\u308f\u304b\u3089\u306a\u3044\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u591a\u304f\u306e\u5834\u5408\u3001\u5c4a\u304b\u306a\u3044\u539f\u56e0\u306f\u5b9b\u5148\u5074\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u306b\u3088\u308b\u53d7\u4fe1\u62d2\u5426\u3067\u3059\u3002<\/p>\n<p>\u9001\u3063\u305f\u30e1\u30fc\u30eb\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u306fSendGrid\u306e\u753b\u9762\u304b\u3089\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u304b\u3089Activity\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u767a\u751f\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u306e\u4e00\u89a7\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Delivered\u304c\u767a\u751f\u3057\u3066\u3044\u308c\u3070\u5b9b\u5148\u30b5\u30fc\u30d0\u306b\u53d7\u3051\u4ed8\u3051\u3089\u308c\u305f\u3053\u3068\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u304c\u3001Bounce\u3084Block\u306a\u3069\u304c\u767a\u751f\u3057\u3066\u3044\u308c\u3070\u30e1\u30fc\u30eb\u306f\u5c4a\u3044\u3066\u3044\u306a\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u30a4\u30d9\u30f3\u30c8\u306e\u7a2e\u985e\u306e\u8a73\u7d30\u306f<a href=\"https:\/\/sendgrid.kke.co.jp\/docs\/Tutorials\/C_Manage_Events\/using_activity.html\" rel=\"noopener\" target=\"_blank\">\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u304a\u308f\u308a\u306b<\/h3>\n<p>Twilio SendGrid\u3092\u4f7f\u3048\u3070\u3068\u3066\u3082\u30b7\u30f3\u30d7\u30eb\u306bDjango\u306e\u30e1\u30fc\u30eb\u9001\u4fe1\u6a5f\u80fd\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Twilio SendGrid\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\u3068\u3044\u3046\u304d\u3063\u304b\u3051\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\uff01<\/p>\n<h3>\u53c2\u8003\u8cc7\u6599<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u306fDjango\u306e\u30e1\u30fc\u30eb\u9001\u4fe1\u6a5f\u80fd\u3068Twilio SendGrid\u306b\u95a2\u3059\u308b\u88dc\u8db3\u8cc7\u6599\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.djangoproject.com\/en\/3.0\/topics\/email\/\" rel=\"noopener\" target=\"_blank\">Sending Email<\/a> (Django\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8): HTML\u30e1\u30fc\u30eb\u3084\u30d5\u30a1\u30a4\u30eb\u306e\u6dfb\u4ed8\u306a\u3069\u3001Diango\u3067\u63d0\u4f9b\u3055\u308c\u308b\u30e1\u30fc\u30eb\u9001\u4fe1\u6a5f\u80fd\u306b\u3064\u3044\u3066\u8abf\u3079\u308b\u306b\u306f\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u4e00\u756a\u3067\u3059\u3002<\/li>\n<li><a href=\"https:\/\/www.twilio.com\/quest\" rel=\"noopener\" target=\"_blank\">TwilioQuest<\/a>: \u4e0e\u3048\u3089\u308c\u305f\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u30af\u30ea\u30a2\u3059\u308b\u3053\u3068\u3067Twilio\u306e\u30b5\u30fc\u30d3\u30b9\u3084API\u306b\u3064\u3044\u3066\u30b2\u30fc\u30e0\u611f\u899a\u3067\u5b66\u3079\u308b\u9762\u767d\u3044\u30b5\u30a4\u30c8\u3067\u3059\u3002SendGrid\u306b\u95a2\u3059\u308b\u30df\u30c3\u30b7\u30e7\u30f3\u3082\u3042\u308b\u306e\u3067\u904a\u3093\u3067\u5b66\u3093\u3067\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306f Using Twilio SendGrid To Send Emails from Python Django Applications \u306e\u6284\u8a33\u3067\u3059\u3002 Web\u30a2\u30d7\u30ea\u306b\u30e1\u30fc\u30eb\u9001\u4fe1\u6a5f\u80fd\u3092\u3069\u3046\u7d44\u307f\u8fbc\u3080\u304b\u306f\u5e38\u306b\u5384\u4ecb\u306a <a class=\"read-more\" href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=12694\">&#8230;\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":12695,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11,8],"tags":[],"class_list":["post-12694","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\/12694","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=12694"}],"version-history":[{"count":11,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12694\/revisions"}],"predecessor-version":[{"id":20642,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12694\/revisions\/20642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/media\/12695"}],"wp:attachment":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}