packages feed

mime-mail-ses 0.4.3 → 0.4.4

raw patch · 4 files changed

+24/−15 lines, 4 filesdep +cryptondep +memorydep −byteabledep −cryptohashdep ~conduitnew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: crypton, memory

Dependencies removed: byteable, cryptohash

Dependency ranges changed: conduit

API changes (from Hackage documentation)

- Network.Mail.Mime.SES: sendMailSESWithResponse :: MonadIO m => Manager -> SES -> ByteString -> (Status -> Sink Event IO a) -> m a
+ Network.Mail.Mime.SES: sendMailSESWithResponse :: MonadIO m => Manager -> SES -> ByteString -> (Status -> ConduitT Event Void IO a) -> m a

Files

ChangeLog.md view
@@ -1,3 +1,9 @@+## 0.4.4++* Use `crypton` instead of `cryptohash` as a dependency. `cryptohash` is abandoned.+* Avoid deprecated conduit functions.+* New maintainer: Janus Troelsen+ ## 0.4.3  * Add function 'sendMailSESWithResponse'.
Network/Mail/Mime/SES.hs view
@@ -20,12 +20,13 @@ import           Data.ByteString.Base64      (encode) import qualified Data.ByteString.Char8       as S8 import qualified Data.ByteString.Lazy        as L-import           Data.Conduit                (Sink, await, ($$), (=$))+import           Data.Conduit                (ConduitT, await, connect, (.|)) import           Data.Text                   (Text) import qualified Data.Text                   as T import qualified Data.Text.Encoding          as E import           Data.Time                   (getCurrentTime) import           Data.Typeable               (Typeable)+import           Data.Void                   (Void) import           Data.XML.Types              (Content (ContentText), Event (EventBeginElement, EventContent)) import           Network.HTTP.Client         (Manager,                                               requestHeaders, responseBody,@@ -73,7 +74,7 @@ -- Generalised version of 'sendMailSES' which allows customising the final return type. sendMailSESWithResponse :: MonadIO m => Manager -> SES                         -> L.ByteString-                        -> (Status -> Sink Event IO a)+                        -> (Status -> ConduitT Event Void IO a)                         -- ^ What to do with the HTTP 'Status' returned in the 'Response'.                         -> m a sendMailSESWithResponse manager ses msg onResponseStatus = liftIO $ do@@ -93,9 +94,10 @@                               (patchedRequestHeaders tentativeRequest) (sesAccessKey ses) sig         finalRequest = tentativeRequest {requestHeaders = ("Authorization", authorizationString): requestHeaders tentativeRequest}     withResponse finalRequest manager $ \res ->-           bodyReaderSource (responseBody res)-        $$ parseBytes def-        =$ onResponseStatus (responseStatus res)+           bodyReaderSource (responseBody res) `connect`+             (parseBytes def+                .| onResponseStatus (responseStatus res)+             )   where     qs =           ("Action", "SendRawEmail")@@ -117,7 +119,7 @@   mgr <- liftIO getGlobalManager   sendMailSES mgr ses msg -checkForError :: Status -> Sink Event IO ()+checkForError :: Status -> ConduitT Event Void IO () checkForError status = do     name <- getFirstStart     if name == errorResponse
Network/Mail/Mime/SES/Internal.hs view
@@ -4,9 +4,10 @@  module Network.Mail.Mime.SES.Internal where -import           Crypto.Hash                 (SHA256, hmac, hmacGetDigest, hash)+import           Crypto.Hash                 (SHA256, hash)+import           Crypto.MAC.HMAC             (hmac, hmacGetDigest) import           Data.Bifunctor              (bimap)-import           Data.Byteable               (toBytes)+import           Data.ByteArray              (convert) import           Data.ByteString             (ByteString) import qualified Data.ByteString             as B import           Data.ByteString.Base16      as Base16@@ -134,7 +135,7 @@ bytesToLowerCase = S8.pack . fmap toLower . S8.unpack  unaryHashBase16 :: ByteString -> ByteString-unaryHashBase16 = Base16.encode . toBytes . hash @SHA256+unaryHashBase16 = Base16.encode . convert . hash @ByteString @SHA256  keyedHash :: ByteString -> ByteString -> ByteString-keyedHash key payload = toBytes . hmacGetDigest $ hmac @SHA256 key payload+keyedHash key payload = convert . hmacGetDigest $ hmac @ByteString @ByteString @SHA256 key payload
mime-mail-ses.cabal view
@@ -1,12 +1,12 @@ Name:                mime-mail-ses-Version:             0.4.3+Version:             0.4.4 Synopsis:            Send mime-mail messages via Amazon SES description:         Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/mime-mail-ses>. Homepage:            http://github.com/snoyberg/mime-mail License:             MIT License-file:        LICENSE Author:              Michael Snoyman-Maintainer:          michael@snoyman.com+Maintainer:          Janus Troelsen <ysangkok@gmail.com> Category:            Web Build-type:          Simple Cabal-version:       >=1.10@@ -19,15 +19,15 @@   Build-depends:       base               >= 4.9       && < 5                      , base16-bytestring                      , base64-bytestring  >= 0.1-                     , byteable                      , bytestring         >= 0.9                      , case-insensitive-                     , conduit-                     , cryptohash         >= 0.7.3+                     , conduit            >= 1.3+                     , crypton            >= 1.0.5                      , http-client        >= 0.2.2.2                      , http-client-tls    >= 0.2.4                      , http-conduit       >= 2.1                      , http-types         >= 0.6.8+                     , memory             >= 0.18                      , mime-mail          >= 0.3                      , text                      , time               >= 1.1