-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Send HTML formatted emails using Amazon's SES REST API with blaze -- -- Send html emails using Amazon's Simple Email Service and Blaze -- Templating in Haskell @package ses-html @version 0.2.0.2 module Network.SES -- | Send Emails templated with Blaze using SES -- --
--   main :: IO ()
--   main = print =<< sendEmailBlaze publicKey secretKey region from to subject html
--    where
--      publicKey = PublicKey "public key goes here"
--      secretKey = SecretKey "secret key goes here"
--      region    = USEast1
--      from    = "verifiedSender@domain.com"
--      to      = ["recipient@domain.com"]
--      subject = "Test Subject"
--      html = H.html $ do
--               H.body $ do
--                  H.h1 "Html email!"
--   
sendEmailBlaze :: PublicKey -> SecretKey -> Region -> From -> To -> Subject -> Html -> IO SESResult -- | Send emails without using Blaze, raw bytes are expected to be valid -- HTML sendEmail :: PublicKey -> SecretKey -> Region -> From -> To -> Subject -> ByteString -> IO SESResult type From = ByteString type To = [ByteString] type Subject = ByteString -- | Types for AWS Keys newtype PublicKey PublicKey :: ByteString -> PublicKey newtype SecretKey SecretKey :: ByteString -> SecretKey -- | Types for AWS Regions data Region -- | US East 1 Region USEast1 :: Region -- | US West 2 Region USWest2 :: Region -- | EU West 1 Region EUWest1 :: Region -- | Common Error Types for SES -- -- http://s3.amazonaws.com/awsdocs/ses/latest/ses-api.pdf data SESErrorType IncompleteSignature :: SESErrorType InternalFailure :: SESErrorType InvalidAction :: SESErrorType InvalidClientTokenId :: SESErrorType InvalidParameterCombination :: SESErrorType InvalidParameterValue :: SESErrorType InvalidQueryParameter :: SESErrorType MalformedQueryString :: SESErrorType MissingAction :: SESErrorType MissingAuthenticationToken :: SESErrorType SignatureDoesNotMatch :: SESErrorType MissingParameter :: SESErrorType MessageRejected :: SESErrorType OptInRequired :: SESErrorType RequestExpired :: SESErrorType ServiceUnavailable :: SESErrorType Throttling :: SESErrorType UnknownErrorType :: SESErrorType ValidationError :: SESErrorType data SESError -- | Connection Error, can occur on open & close or on send & -- receive of a Request or Response SESConnectionError :: ByteString -> SESError -- | If a request is made successfully but the parameters specifed were -- incorrect SESError :: SESErrorCode -> SESErrorType -> SESErrorMessage -> SESError -- | The result of invoking an SES action data SESResult -- | The encapsulated SESError Error :: SESError -> SESResult -- | A successful email has been sent Success :: SESResult -- | Types to hold SES Errors type SESErrorCode = Int type SESErrorMessage = ByteString instance Show PublicKey instance Eq PublicKey instance Show SecretKey instance Eq SecretKey instance Show SESErrorType instance Read SESErrorType instance Show SESError instance Show SESResult instance Show Region