LoginSignup
1
2

More than 1 year has passed since last update.

gmail から semdgrid を使い smtp 送信

Last updated at Posted at 2022-01-12

gmailからsendgrid を使いたい。

参考
https://sendgrid.kke.co.jp/blog/?p=9320

APIキーは
settings > API keys > Create API Key
で作成

SMTPサーバー:smtp.sendgrid.net(固定)
ポート587(固定)
ユーザー名:apikey(apikeyという文字列で固定)
パスワード:SG から始まるAPIキー

まぁ、これでいいが、

gmail側はけっこういろんなIPを使っているみたいで
IPブロック設定をしていると、弾かれてしまう。

ということで、sendgridで


209.11.167.*

みたいに ワイルドカードを使ってIPを設定しよう。

SPF、DKIM のチェック

以下、成功

このメールの認証情報
SPF

PASS (IP: 12.34.63.22)

DKIM

PASS (ドメイン: your.com)
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2