Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion changelog.d/2-features/smtp-logging

This file was deleted.

2 changes: 0 additions & 2 deletions libs/types-common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
, lens-datetime
, lib
, mime
, network
, optparse-applicative
, pem
, protobuf
Expand Down Expand Up @@ -92,7 +91,6 @@ mkDerivation {
lens
lens-datetime
mime
network
optparse-applicative
pem
protobuf
Expand Down
6 changes: 1 addition & 5 deletions libs/types-common/src/Wire/Arbitrary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ import GHC.Generics (Rep)
import Generic.Random (listOf', (:+) ((:+)))
import qualified Generic.Random as Generic
import Imports
import Network.Socket (PortNumber)
import Test.QuickCheck.Arbitrary (Arbitrary (arbitrary))
import qualified Test.QuickCheck.Arbitrary as QC
import Test.QuickCheck.Gen (Gen (MkGen), chooseBoundedIntegral)
import Test.QuickCheck.Gen (Gen (MkGen))
import Test.QuickCheck.Instances ()
import Test.QuickCheck.Random

Expand Down Expand Up @@ -121,6 +120,3 @@ generateExample :: Arbitrary a => a
generateExample =
let (MkGen f) = arbitrary
in f (mkQCGen 42) 42

instance Arbitrary PortNumber where
arbitrary = chooseBoundedIntegral (minBound :: PortNumber, maxBound :: PortNumber)
1 change: 0 additions & 1 deletion libs/types-common/types-common.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ library
, lens >=4.10
, lens-datetime >=0.3
, mime >=0.4.0.2
, network
, optparse-applicative >=0.10
, pem
, protobuf >=0.2
Expand Down
8 changes: 0 additions & 8 deletions nix/haskell-pins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,6 @@ let
tasty-hunit = "hunit";
};
};
# This can be removed once postie 0.6.0.3 (or later) is in nixpkgs
postie = {
src = fetchgit {
url = "https://github.com/alexbiehl/postie.git";
rev = "c92702386f760fcaa65cd052dc8114889c001e3f";
sha256 = "sha256-yiw6hg3guRWS6CVdrUY8wyIDxoqfGjIVMrEtP+Fys0Y=";
};
};
};
hackagePins = {
kind-generics = {
Expand Down
3 changes: 0 additions & 3 deletions nix/manual-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,4 @@ hself: hsuper: {

# Make hoogle static to reduce size of the hoogle image
hoogle = hlib.justStaticExecutables hsuper.hoogle;

# Postie has been fixed upstream (master)
postie = hlib.markUnbroken (hlib.doJailbreak hsuper.postie);
}
7 changes: 0 additions & 7 deletions services/brig/brig.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ library
, text >=0.11
, text-icu-translit >=0.1
, time >=1.1
, time-out
, time-units
, tinylog >=0.10
, transformers >=0.3
, types-common >=0.16
Expand Down Expand Up @@ -465,7 +463,6 @@ executable brig-integration
Federation.Util
Index.Create
Main
SMTP
Util
Util.AWS

Expand Down Expand Up @@ -555,16 +552,13 @@ executable brig-integration
, lens-aeson
, metrics-wai
, mime >=0.4
, mime-mail
, MonadRandom >=0.5
, mtl
, network
, optparse-applicative
, pem
, pipes
, polysemy
, polysemy-wire-zoo
, postie >=0.6.0.3
, process
, proto-lens
, QuickCheck
Expand All @@ -585,7 +579,6 @@ executable brig-integration
, temporary >=1.2.1
, text
, time >=1.5
, time-units
, tinylog
, transformers
, types-common >=0.3
Expand Down
10 changes: 0 additions & 10 deletions services/brig/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@
, network-conduit-tls
, optparse-applicative
, pem
, pipes
, polysemy
, polysemy-plugin
, polysemy-wire-zoo
, postie
, process
, proto-lens
, QuickCheck
Expand Down Expand Up @@ -132,8 +130,6 @@
, text
, text-icu-translit
, time
, time-out
, time-units
, tinylog
, transformers
, types-common
Expand Down Expand Up @@ -271,8 +267,6 @@ mkDerivation {
text
text-icu-translit
time
time-out
time-units
tinylog
transformers
types-common
Expand Down Expand Up @@ -335,16 +329,13 @@ mkDerivation {
lens-aeson
metrics-wai
mime
mime-mail
MonadRandom
mtl
network
optparse-applicative
pem
pipes
polysemy
polysemy-wire-zoo
postie
process
proto-lens
QuickCheck
Expand All @@ -365,7 +356,6 @@ mkDerivation {
temporary
text
time
time-units
tinylog
transformers
types-common
Expand Down
7 changes: 3 additions & 4 deletions services/brig/src/Brig/Email.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,19 @@ module Brig.Email
where

import qualified Brig.AWS as AWS
import Brig.App (Env, applog, awsEnv, smtpEnv)
import Brig.App (Env, awsEnv, smtpEnv)
import qualified Brig.SMTP as SMTP
import Control.Lens (view)
import Control.Monad.Catch
import qualified Data.Text as Text
import Imports
import Network.Mail.Mime
import Wire.API.User

-------------------------------------------------------------------------------
sendMail :: (MonadIO m, MonadCatch m, MonadReader Env m) => Mail -> m ()
sendMail :: (MonadIO m, MonadReader Env m) => Mail -> m ()
sendMail m =
view smtpEnv >>= \case
Just smtp -> view applog >>= \logger -> SMTP.sendMail logger smtp m
Just smtp -> SMTP.sendMail smtp m
Nothing -> view awsEnv >>= \e -> AWS.execute e $ AWS.sendMail m

-------------------------------------------------------------------------------
Expand Down
Loading