ses-html-0.2.0.1: Send HTML formatted emails using Amazon's SES REST API with blaze

Safe HaskellNone
LanguageHaskell2010

Network.SES

Contents

Synopsis

Email creation

sendEmailBlaze Source

Arguments

:: PublicKey

AWS Public Key

-> SecretKey

AWS Secret Key

-> Region

The Region to send the Request

-> From

The Email sender

-> To

The Email recipient

-> Subject

The Subject of the Email

-> Html

The Html of the email body

-> IO SESResult 

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!"

sendEmail Source

Arguments

:: PublicKey

AWS Public Key

-> SecretKey

AWS Secret Key

-> Region

The Region to send the Request

-> From

The Email sender

-> To

The Email recipient

-> Subject

The Subject of the Email

-> ByteString

Raw Html

-> IO SESResult 

Send emails without using Blaze, raw bytes are expected to be valid HTML

Types

newtype PublicKey Source

Types for AWS Keys

Constructors

PublicKey ByteString 

newtype SecretKey Source

Constructors

SecretKey ByteString 

data Region Source

Types for AWS Regions

Constructors

USEast1

US East 1 Region

USWest2

US West 2 Region

EUWest1

EU West 1 Region

Instances

Show Region

Custome Show instance for Region

data SESError Source

Constructors

SESConnectionError ByteString

Connection Error, can occur on open & close or on send & receive of a Request or Response

SESError SESErrorCode SESErrorType SESErrorMessage

If a request is made successfully but the parameters specifed were incorrect

Instances

data SESResult Source

The result of invoking an SES action

Constructors

Error SESError

The encapsulated SESError

Success

A successful email has been sent

Instances

type SESErrorCode Source

Arguments

 = Int

Error Code returned from SES XML response

Types to hold SES Errors

type SESErrorMessage Source

Arguments

 = ByteString

Error Message returned from SES Message