Merge pull request #7566 from blockscout/vb-account-check-email

Account: check composed email beofre sending
pull/7568/head
Victor Baranov 1 year ago committed by GitHub
commit a37b0c565e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 21
      apps/explorer/lib/explorer/account/notifier/notify.ex

@ -11,6 +11,7 @@
### Fixes ### Fixes
- [#7566](https://github.com/blockscout/blockscout/pull/7566) - Account: check composed email beofre sending
- [#7564](https://github.com/blockscout/blockscout/pull/7564) - Return contract type in address view - [#7564](https://github.com/blockscout/blockscout/pull/7564) - Return contract type in address view
- [#7562](https://github.com/blockscout/blockscout/pull/7562) - Remove fallback from Read methods - [#7562](https://github.com/blockscout/blockscout/pull/7562) - Remove fallback from Read methods
- [#7537](https://github.com/blockscout/blockscout/pull/7537), [#7553](https://github.com/blockscout/blockscout/pull/7553) - Withdrawals fixes and improvements - [#7537](https://github.com/blockscout/blockscout/pull/7537), [#7553](https://github.com/blockscout/blockscout/pull/7553) - Withdrawals fixes and improvements

@ -96,14 +96,19 @@ defmodule Explorer.Account.Notifier.Notify do
email = Email.compose(notification, address) email = Email.compose(notification, address)
case Mailer.deliver_now(email, response: true) do if email do
{:ok, _email, response} -> case Mailer.deliver_now(email, response: true) do
Logger.info("--- email delivery response: SUCCESS", fetcher: :account) {:ok, _email, response} ->
Logger.info(response, fetcher: :account) Logger.info("--- email delivery response: SUCCESS", fetcher: :account)
Logger.info(response, fetcher: :account)
{:error, error} ->
Logger.info("--- email delivery response: FAILED", fetcher: :account) {:error, error} ->
Logger.info(error, fetcher: :account) Logger.info("--- email delivery response: FAILED", fetcher: :account)
Logger.info(error, fetcher: :account)
end
else
Logger.info("--- email delivery response: FAILED", fetcher: :account)
Logger.info("Email is not composed (is nil)", fetcher: :account)
end end
end end

Loading…
Cancel
Save