1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GigalixirでSendgridのAPI keyを設定

Posted at

まずruntime.exsでAPI keyを環境変数として呼び出せるように設定

runtime.exs
...
  config :lv10, Lv10.Mailer,
    adapter: Swoosh.Adapters.Sendgrid,
    api_key: System.get_env("SENDGRID_API_KEY")
...

CLIで環境変数を使えるようにする

% gigalixir config:set SENDGRID_API_KEY=SG.******

実行後、自動的にアプリがリスタートされ、以降Sendgridでメールを送信可能になります。

1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?