email-postmark 0.1 → 0.2
raw patch · 2 files changed
+6/−6 lines, 2 filesdep ~aesondep ~attoparsecPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, attoparsec
API changes (from Hackage documentation)
Files
- email-postmark.cabal +3/−3
- src/Network/Mail/Postmark.hs +3/−3
email-postmark.cabal view
@@ -1,5 +1,5 @@ Name: email-postmark-Version: 0.1+Version: 0.2 Synopsis: A simple wrapper to send emails via the api of the service postmark (http://postmarkapp.com/) -- Description: License: BSD3@@ -31,8 +31,8 @@ HTTP >= 4000 && < 4001, bytestring >= 0.9.1 && < 0.10, containers >= 0.2 && < 0.5,- attoparsec >= 0.8 && < 0.10,- aeson >= 0.3 && < 0.4+ attoparsec >= 0.8 && < 0.11,+ aeson >= 0.3 && < 0.7 -- mtl >= 2 && < 3, -- text >= 0.11 && < 0.12, -- time >= 1.1 && < 1.3,
src/Network/Mail/Postmark.hs view
@@ -7,14 +7,17 @@ import Data.Aeson import Data.Aeson.Types import qualified Data.Attoparsec as A+{-import Control.Monad-} import qualified Data.Map as M import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString as BS+{-import qualified Data.ByteString.Char8 as B8-} import Data.Maybe (fromJust) import Network.HTTP hiding (getRequest) import Network.HTTP.Base import Network.HTTP.Headers import Network.URI (parseURI)+{-import Control.Monad.Trans-} maybeAesonResult (Error _) = Nothing@@ -22,9 +25,6 @@ strictifyBS = BS.concat . LBS.toChunks --- | The main function, sends an email with the provided--- from, to, tag, body, and to address. Token is your Postmark token.--- It returns a boolean depending on whether it succeeded or note. postmark token from subject tag body to = do resp <- simpleHTTP (Request (fromJust $ parseURI "http://api.postmarkapp.com/email")