packages feed

mime-mail-ses 0.4.2 → 0.4.3

raw patch · 3 files changed

+19/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

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

Files

ChangeLog.md view
@@ -1,4 +1,8 @@-## 0.5.1+## 0.4.3++* Add function 'sendMailSESWithResponse'.++## 0.4.2  * Add executable `send-aws` for sending e-mails via Amazon SES from command line. * Update Signature Version for Amazon SES from 3 to 4.
Network/Mail/Mime/SES.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE CPP #-} module Network.Mail.Mime.SES     ( sendMailSES+    , sendMailSESWithResponse     , sendMailSESGlobal     , renderSendMailSES     , renderSendMailSESGlobal@@ -65,7 +66,17 @@                             -- email header fields, MIME types, and                             -- MIME encoding.             -> m ()-sendMailSES manager ses msg = liftIO $ do+sendMailSES manager ses msg =+  sendMailSESWithResponse manager ses msg checkForError++-- | @since 0.4.3+-- Generalised version of 'sendMailSES' which allows customising the final return type.+sendMailSESWithResponse :: MonadIO m => Manager -> SES+                        -> L.ByteString+                        -> (Status -> Sink Event IO a)+                        -- ^ What to do with the HTTP 'Status' returned in the 'Response'.+                        -> m a+sendMailSESWithResponse manager ses msg onResponseStatus = liftIO $ do     now <- getCurrentTime     requestBase <- buildRequest (concat ["https://email.", T.unpack (sesRegion ses) , ".amazonaws.com"])     let headers =@@ -84,7 +95,7 @@     withResponse finalRequest manager $ \res ->            bodyReaderSource (responseBody res)         $$ parseBytes def-        =$ checkForError (responseStatus res)+        =$ onResponseStatus (responseStatus res)   where     qs =           ("Action", "SendRawEmail")
mime-mail-ses.cabal view
@@ -1,5 +1,5 @@ Name:                mime-mail-ses-Version:             0.4.2+Version:             0.4.3 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