1 Comment

Great article :) when I first followed this, for me it worked for dev, but not prod, and I wasn't sure why. For anyone else with the same issue, my problem was that I'm using Distillery for production, and Distillery handles runtime configuration differently. The solution was to put the configuration in prod.exs instead, and set the :api_key value to "${SENDGRID_API_KEY}", which Distillery swaps in at runtime via REPLACE_OS_VARS: https://hexdocs.pm/distillery/config/runtime.html

Expand full comment