#author("2020-08-26T06:17:38+00:00","","") #mynavi(Go言語) #setlinebreak(on); * 概要 [#n43a772a] #html(<div class="pl10">) Azure Functions から SendGrid を使用してメール送信するサンプルを記載する。 尚、関数アプリは [[Azure Functions を Go で書く]] で作成したものをベースとする為、当記事の実装は Go となる。 #html(</div>) * 目次 [#ae66c768] #contents - 関連 -- [[Azureメモ]] -- [[Go言語]] - 参考 -- [[SendGrid公式>https://sendgrid.kke.co.jp]] --- [[Microsoft AzureからのSendGridの利用方法>https://sendgrid.kke.co.jp/blog/?p=2621]] --- [[Goでメール送信!SendGridを使って簡単に実装する方法>https://sendgrid.kke.co.jp/blog/?p=1241]] --- [[Goのサンプルコード(公式サイト)>https://sendgrid.kke.co.jp/docs/Integrate/Code_Examples/v3_Mail/go.html]] --- [[価格>https://sendgrid.kke.co.jp/plan/]] -- Azureドキュメント --- [[SendGrid を使用した Azure での電子メールの送信方法>https://docs.microsoft.com/ja-jp/azure/sendgrid-dotnet-how-to-send-email]] * SendGird アカウントの登録 [#o35e4036] #html(<div class="pl10">) ** 登録方法による FREEプランの利用枠の違い [#f0d921a5] #html(<div class="pl10">) Azure Marketplace からと 日本公式サイトから登録できるが、登録方法によってFREEプランの利用枠が異なる。 | 登録先 | FEEプランの利用枠 |h | Marketplace | 25,000通/月 | | 日本公式サイト | 400通/日 | ※ https://sendgrid.kke.co.jp/blog/?p=2621 日単位と月単位で紛らわしいが、Marketplace から登録する方が2倍近くの量を送信できる。 #html(</div>) ** Marketplace から SendGird アカウント登録 [#k51715d3] #html(<div class="pl10">) #TODO #html(</div>) #html(</div>) * 利用準備 [#k1941cd8] #html(<div class="pl10">) ** SendGrid API キーの作成/確認 [#jf890ebb] #html(<div class="pl10">) #html(</div>) ** go get [#u7ab22ca] #html(<div class="pl10">) #myterm2(){{ go get github.com/sendgrid/sendgrid-go go get github.com/joho/godotenv }} #html(</div>) #html(</div>) * 実装 [#eb83275b] #html(<div class="pl10">) #html(</div>)