mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
* Send transactional email from no-reply@mail.innersquare.app Centralise the sender identity, reply-to address and SES configuration set in Chesstrainer.Mail so no notifier can drift. Add MAIL_REDIRECT_TO for smoke tests and a mix mail.check task that exercises the SES mailbox simulators, and document the setup in the deploy guide and .env.example. * Tighten crawler metadata and keep play pages out of search Canonical URLs no longer carry query strings, public pages get an OG image, WebSite JSON-LD and a per-page language, and the sitemap dates the landing page only. Play and guest-training routes are marked noindex so tens of thousands of near-identical pages stay out of the index. * Measure built asset sizes with mix assets.sizes Report raw, gzip and brotli sizes for built JS and CSS, and record the current numbers plus the board-code split recommendation in docs/assets.md.
40 lines
877 B
Elixir
40 lines
877 B
Elixir
defmodule Chesstrainer.MailingList.Notifier do
|
|
@moduledoc """
|
|
Emails for the mailing list.
|
|
"""
|
|
|
|
import Swoosh.Email
|
|
|
|
alias Chesstrainer.Branding
|
|
alias Chesstrainer.Mail
|
|
|
|
@doc """
|
|
Delivers the confirmation email for a mailing-list subscription.
|
|
"""
|
|
def deliver_confirmation_instructions(email, url) do
|
|
deliver(email, "Confirm your mailing list subscription", """
|
|
|
|
==============================
|
|
|
|
Hi #{email},
|
|
|
|
You asked to receive occasional endgame tips and site news from
|
|
#{Branding.name()}. Confirm your subscription by visiting the URL below:
|
|
|
|
#{url}
|
|
|
|
If you didn't ask for this, ignore this email and we won't add you.
|
|
|
|
==============================
|
|
""")
|
|
end
|
|
|
|
defp deliver(recipient, subject, body) do
|
|
new()
|
|
|> to(recipient)
|
|
|> subject(subject)
|
|
|> text_body(body)
|
|
|> Mail.deliver()
|
|
end
|
|
end
|