mandrill-0.1.0.2: Library for interfacing with the Mandrill JSON API

Safe HaskellNone
LanguageHaskell2010

Network.API.Mandrill.Types

Synopsis

Documentation

data MandrillError Source

Constructors

MandrillError 

Fields

_merr_status :: !Text
 
_merr_code :: !Int
 
_merr_name :: !Text
 
_merr_message :: !Text
 

Instances

data MandrillResponse k Source

The main datatypes which models the response from the Mandrill API, which can be either a success or a failure.

Instances

Show k => Show (MandrillResponse k) 
FromJSON k => FromJSON (MandrillResponse k) 

data MandrillRecipient Source

An array of recipient information.

Constructors

MandrillRecipient 

Fields

_mrec_email :: EmailAddress

The email address of the recipient

_mrec_name :: Maybe Text

The optional display name to use for the recipient

_mrec_type :: Maybe MandrillRecipientTag

The header type to use for the recipient. defaults to "to" if not provided

mrec_email :: Lens' MandrillRecipient EmailAddress Source

newtype MandrillHtml Source

Constructors

MandrillHtml Html 

Instances

type MandrillTags = Text Source

type MandrillHeaders = Value Source

type MandrillVars = Value Source

data MandrillWebContent Source

Constructors

MandrillWebContent 

Fields

_mwct_type :: !Text
 
_mwct_name :: !Text
for images
the Content ID of the image - use src="cid:THIS_VALUE" to reference the image in your HTML content
_mwct_content :: !Base64ByteString
 

data MandrillMessage Source

The information on the message to send

Constructors

MandrillMessage 

Fields

_mmsg_html :: MandrillHtml

The full HTML content to be sent

_mmsg_text :: Maybe Text

Optional full text content to be sent

_mmsg_subject :: !Text

The message subject

_mmsg_from_email :: EmailAddress

The sender email address

_mmsg_from_name :: Maybe Text

Optional from name to be used

_mmsg_to :: [MandrillRecipient]

A list of recipient information

_mmsg_headers :: MandrillHeaders

optional extra headers to add to the message (most headers are allowed)

_mmsg_important :: Maybe Bool

whether or not this message is important, and should be delivered ahead of non-important messages

_mmsg_track_opens :: Maybe Bool

whether or not to turn on open tracking for the message

_mmsg_track_clicks :: Maybe Bool

whether or not to turn on click tracking for the message

_mmsg_auto_text :: Maybe Bool

whether or not to automatically generate a text part for messages that are not given text

_mmsg_auto_html :: Maybe Bool

whether or not to automatically generate an HTML part for messages that are not given HTML

_mmsg_inline_css :: Maybe Bool

whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size

_mmsg_url_strip_qs :: Maybe Bool

whether or not to strip the query string from URLs when aggregating tracked URL data

_mmsg_preserve_recipients :: Maybe Bool

whether or not to expose all recipients in to To header for each email

_mmsg_view_content_link :: Maybe Bool

set to false to remove content logging for sensitive emails

_mmsg_bcc_address :: Maybe Text

an optional address to receive an exact copy of each recipient's email

_mmsg_tracking_domain :: Maybe Text

a custom domain to use for tracking opens and clicks instead of mandrillapp.com

_mmsg_signing_domain :: Maybe Bool

a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients)

_mmsg_return_path_domain :: Maybe Bool

a custom domain to use for the messages's return-path

_mmsg_merge :: Maybe Bool

whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.

_mmsg_global_merge_vars :: [MandrillVars]

global merge variables to use for all recipients. You can override these per recipient.

_mmsg_merge_vars :: [MandrillMergeVars]

per-recipient merge variables, which override global merge variables with the same name.

_mmsg_tags :: [MandrillTags]

an array of string to tag the message with. Stats are accumulated using tags, though we only store the first 100 we see, so this should not be unique or change frequently. Tags should be 50 characters or less. Any tags starting with an underscore are reserved for internal use and will cause errors.

_mmsg_subaccount :: Maybe Text

the unique id of a subaccount for this message - must already exist or will fail with an error

_mmsg_google_analytics_domains :: [Text]

an array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically.

_mmsg_google_analytics_campaign :: Maybe Text

optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.

_mmsg_metadata :: MandrillVars

metadata an associative array of user metadata. Mandrill will store this metadata and make it available for retrieval. In addition, you can select up to 10 metadata fields to index and make searchable using the Mandrill search api.

_mmsg_recipient_metadata :: [MandrillMetadata]

Per-recipient metadata that will override the global values specified in the metadata parameter.

_mmsg_attachments :: [MandrillWebContent]

an array of supported attachments to add to the message

_mmsg_images :: [MandrillWebContent]

an array of embedded images to add to the message

Instances

mmsg_from_email :: Lens' MandrillMessage EmailAddress Source

type MandrillKey = Text Source

newtype MandrillDate Source

Constructors

MandrillDate 

Instances