packages feed

mailgun 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+5/−3 lines, 2 filesdep +exceptions

Dependencies added: exceptions

Files

mailgun.cabal view
@@ -1,5 +1,5 @@ name:                mailgun-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Connector to Rackspace's Mailgun Service description:         Allows users to directly access Rackspace's Mailgun service                      without having to work with the underlying REST service.@@ -28,6 +28,7 @@                     ,   monad-control >=0.3.2.3                     ,   http-client >=0.2.2.4                     ,   failure >=0.2.0.2+                    ,   exceptions >=0.5  executable send     main-is:            Send.hs
src/Rackspace/MailGun.hs view
@@ -11,6 +11,7 @@     ) where  import           Control.Failure+import           Control.Monad.Catch                   (MonadThrow) import           Control.Monad.IO.Class import           Control.Monad.Trans.Control import           Data.ByteString.Char8                 as BS (ByteString, pack,@@ -63,13 +64,13 @@              ++ partMaybeText "subject" (subject msg)              ++ buildTail msg -sendMessage :: (Failure HttpException m, MonadBaseControl IO m, MonadIO m) =>+sendMessage :: (Failure HttpException m, MonadThrow m, MonadBaseControl IO m, MonadIO m) =>                 String -> String -> Message -> m (Response LBS.ByteString) sendMessage domain apiKey message = do         withManager $ \manager -> do             sendWith manager domain apiKey message -sendWith :: (Failure HttpException m, MonadBaseControl IO m, MonadIO m) =>+sendWith :: (Failure HttpException m, MonadThrow m, MonadBaseControl IO m, MonadIO m) =>                 Manager -> String -> String -> Message -> m (Response LBS.ByteString) sendWith manager domain apiKey message = do         initReq <- parseUrl $ baseUrl ++ "/" ++ domain ++ "/messages"