1[](https://travis-ci.org/adinapoli/mandrill)
2[](https://coveralls.io/r/adinapoli/mandrill)
4# Haskell Client for the Mandrill JSON API
6This module implement a low-level, 1:1 mapping API to
7the [Mandrill](http://mandrillapp.com) transactional email service.
13* Modified the `Base64ByteString` type to accept another constructor. This
14 allows the user to pass already-encoded Base64 strings which might be coming
19This package was built with pragmatism and reuse in mind. This means
20this API comes in two flavours: an IO-based and an handy monad transformer
21which can be plugged in your stack of choice.
25{-# LANGUAGE OverloadedStrings #-}
26import Text.Email.Validate
27import Network.API.Mandrill
31 case validate "foo@example.com" of
32 Left err -> print $ "Invalid email!" ++ show err
33 Right addr -> runMandrill "MYTOKENHERE" $ do
34 let msg = "<p>My Html</p>"
35 res <- sendEmail (newTextMessage addr [addr] "Hello" msg)
37 MandrillSuccess k -> liftIO (print k)
38 MandrillFailure f -> liftIO (print f)
41# Supported API versions
44 - [Users call](https://mandrillapp.com/api/docs/users.JSON.html) - 100%
46 + ~~ping.json~~ (as **doesn't return valid json!**)
49 - [Messages call](https://mandrillapp.com/api/docs/messages.JSON.html)
54To test the online API, first build the package with tests enabled:
57cabal install --enable-tests
60Then export an environment variable with your Mandrill **Test** token:
63export MANDRILL_API_KEY="YOURKEYGOESHERE"
66And finally execute the testsuite:
73This library scratches my own itches, but please fork away!
74Pull requests are encouraged to implement the part of the API
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list