defmodule Microwaveprop.Mailer do @moduledoc false use Swoosh.Mailer, otp_app: :microwaveprop import Swoosh.Email @from {"NTMS Propagation", "prop@w5isp.com"} @reply_to "graham@mcintire.me" @doc """ Apply the site-wide `From:` and `Reply-To:` headers to an outgoing email. Centralized here so `UserNotifier` and `EditNotifier` can't drift. """ @spec apply_defaults(Swoosh.Email.t()) :: Swoosh.Email.t() def apply_defaults(email) do email |> from(@from) |> reply_to(@reply_to) end end