Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Documentation updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorn committed Oct 9, 2023
1 parent b27a422 commit 21f0b9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend-elixir/guides/how_we_send_email.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ StudyHall has service-level needs to send email. Specifically, even in these ear

## Postmark

We use [Postmark] as our email delivery provider. When sending emails, we rely on prebuilt templates managed on the [Postmark website][admin]. Within the code that sends emails, you'll see us reference `template_alias` values and then send arbitrary map payloads with various values that will are used to render the templates.
We use [Postmark] as our email delivery provider. When sending emails, we rely on prebuilt templates managed on the [Postmark website][admin]. Within the code that sends emails, you'll see us reference `template_alias` values and then send arbitrary map payloads with various values used to render the templates.

[Postmark]: https://postmarkapp.com
[admin]: https://account.postmarkapp.com/servers/11734328/streams
Expand All @@ -16,8 +16,8 @@ The Elixir library we use to talk to Postmark is [Swoosh]. It has a [Postmark-sp
[Swoosh]: https://hexdocs.pm/swoosh/Swoosh.html
[Postmark-specific adaptor]: https://hexdocs.pm/swoosh/Swoosh.Adapters.Postmark.html

In a production runtime environment, we expect a `POSTMARK_API_KEY` environment variable to be set. When present, our `runtime.exs` file will configure Swoosh to use the Postmark adaptor with our specific API key. You do not need to build the app as `:prod` to use this if you need to evaluate real-world email experiences while working on a new feature locally.
In a production runtime environment, we expect a `POSTMARK_API_KEY` environment variable to be set. When present, our `runtime.exs` file will configure Swoosh to use the Postmark adaptor with our specific API key. You do not need to build the app as `:prod` to use this. If you need to evaluate real-world email experiences while working on a new feature locally, ensure the environment variable is available, and it will work.

In typical local development, without the `POSTMARK_API_KEY` environment variable, you can observe us using the `Swoosh.Adapters.Local` adaptor. Paired with `Plug.Swoosh.MailboxPreview` as defined in our router, you can peek at sent emails via <http://localhost:4000/dev/mailbox/>.
In local development, without the `POSTMARK_API_KEY` environment variable, you can observe us using the `Swoosh.Adapters.Local` adaptor. Paired with `Plug.Swoosh.MailboxPreview` as defined in our router, you can peek at sent emails via <http://localhost:4000/dev/mailbox/>.

For testing, we configure the `Swoosh.Adapters.Test` and utilize `Swoosh.TestAssertions`.

0 comments on commit 21f0b9d

Please sign in to comment.