Sending production emails
In the Sending emails section of Chapter 2, Creating a Reusable Backend with Quart, we configured our app to send emails via Postmark if a POSTMARK_TOKEN
configuration value was present. We can now set up production so that there is a POSTMARK_TOKEN
in the app’s configuration.
To do so, we first need approval from Postmark; this is done to ensure that we don’t intend to misuse their service. As we are using Postmark for transactional emails (e.g., password reset tokens), we should get permission. This is gained via the request approval button or by talking directly to their support.
With permission granted, we can add the relevant DNS records to prove to Postmark that we control the tozo.dev domain. These are available from your Postmark account and should be added as follows to infrastructure/dns.tf:
resource "gandi_livedns_record" "tozo_dev_DKIM" { zone = data.gandi_domain.tozo_dev.id...