X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Femails%2Fmailer.ex;h=5108c71c8a3b63e93ebee8825713ae0205af1952;hb=f3a1f9c3bbb7321876a09b3846b5e10ecf4af94f;hp=eb96f2e8b7b81b4d0557a59334411aa7181eb406;hpb=6fab5fe7f892b5a9cf4d605b079e544583f0ce73;p=akkoma diff --git a/lib/pleroma/emails/mailer.ex b/lib/pleroma/emails/mailer.ex index eb96f2e8b..5108c71c8 100644 --- a/lib/pleroma/emails/mailer.ex +++ b/lib/pleroma/emails/mailer.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors +# Copyright © 2017-2020 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Emails.Mailer do @@ -35,6 +35,11 @@ defmodule Pleroma.Emails.Mailer do def deliver(email, config \\ []) def deliver(email, config) do + # temporary hackney fix until hackney max_connections bug is fixed + # https://git.pleroma.social/pleroma/pleroma/-/issues/2101 + email = + Swoosh.Email.put_private(email, :hackney_options, ssl_options: [versions: [:"tlsv1.2"]]) + case enabled?() do true -> Swoosh.Mailer.deliver(email, parse_config(config)) false -> {:error, :deliveries_disabled}