Fix dayone client
This commit is contained in:
@@ -2,6 +2,6 @@ Hanami.app.register_provider :syndication, namespace: true do
|
||||
start do
|
||||
register "mastodon", Adamantium::Syndication::Mastodon.new
|
||||
register "pinboard", Adamantium::Syndication::Pinboard.new(api_key: target["settings"].pinboard_api_key)
|
||||
register "dayone", Adamantium::Syndication::Dayone.new
|
||||
register "dayone", Adamantium::Syndication::Dayone.new(username: target["settings"].smtp_username, password: target["settings"].smtp_password)
|
||||
end
|
||||
end
|
||||
|
@@ -3,15 +3,18 @@ require "mail"
|
||||
module Adamantium
|
||||
module Syndication
|
||||
class Dayone
|
||||
include Deps["settings"]
|
||||
def initialize(username:, password:)
|
||||
@username = username
|
||||
@password = password
|
||||
end
|
||||
|
||||
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,
|
||||
user_name: @username,
|
||||
password: @password,
|
||||
authentication: "plain",
|
||||
tls: true,
|
||||
openssl_verify_mode: "peer"
|
||||
|
Reference in New Issue
Block a user