mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-18 06:57:59 +01:00
Ensure swoosh mail compatibility with DKIM relay
This commit is contained in:
parent
1cf4df73ce
commit
aa09135cc2
1 changed files with 7 additions and 1 deletions
|
@ -3,12 +3,18 @@ defmodule Philomena.Users.UserNotifier do
|
|||
alias Philomena.Mailer
|
||||
|
||||
defp deliver(to, subject, body) do
|
||||
id =
|
||||
:crypto.strong_rand_bytes(16)
|
||||
|> Base.encode16()
|
||||
|> String.downcase()
|
||||
|
||||
Email.new(
|
||||
to: to,
|
||||
from: mailer_address(),
|
||||
from: {"noreply", mailer_address()},
|
||||
subject: subject,
|
||||
text_body: body
|
||||
)
|
||||
|> Email.header("Message-ID", id)
|
||||
|> Mailer.deliver_later()
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue