Configure mailer

This commit is contained in:
2023-03-07 22:22:08 +11:00
parent de34b2733f
commit 5ff7040292
2 changed files with 14 additions and 0 deletions

View File

@@ -6,6 +6,18 @@ module Adamantium
include Deps["settings"]
def call(name:, content:)
Mail.defaults do
delivery_method :smtp, {
address: "smtp.fastmail.com",
port: 465,
user_name: settings.smtp_username,
password: settings.smtp_password,
authentication: "plain",
tls: true,
openssl_verify_mode: "peer"
}
end
Mail.deliver do
to settings.dayone_email
from settings.from_email