Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data Email = Email {
- emailFrom :: Text
- emailTo :: [Text]
- emailCc :: [Text]
- emailBcc :: [Text]
- emailSubject :: Text
- emailTag :: Maybe Text
- emailHtml :: Maybe Text
- emailText :: Maybe Text
- emailReplyTo :: Text
- emailHeaders :: Map Text Text
- emailTrackOpens :: Maybe Bool
- emailTrackLinks :: Maybe TrackLinks
- emailAttachments :: [Attachment]
- defaultEmail :: Email
- data EmailWithTemplate = EmailWithTemplate {
- templateId :: Int
- templateModel :: Map Text Text
- inlineCss :: Bool
- emailFrom' :: Text
- emailTo' :: [Text]
- emailCc' :: [Text]
- emailBcc' :: [Text]
- emailTag' :: Maybe Text
- emailReplyTo' :: Text
- emailHeaders' :: Map Text Text
- emailTrackOpens' :: Maybe Bool
- emailTrackLinks' :: Maybe TrackLinks
- emailAttachments' :: [Attachment]
- defaultEmailWithTemplate :: EmailWithTemplate
- data TrackLinks
- = None
- | HtmlAndText
- | HtmlOnly
- | TextOnly
- data Attachment = Attachment {}
- data Sent = Sent {}
- ojson :: ToJSON a => Text -> Maybe a -> Maybe (Text, Value)
- oljson :: ToJSON b => Text -> [a] -> ([a] -> b) -> Maybe (Text, Value)
- omjson :: ToJSON a => Text -> Map Text a -> Maybe (Text, Value)
- toText :: ByteString -> Text
Request types
Email data type. It is recommended that you use the defaultEmail function and selector syntax to build an email, e.g.:
defaultEmail { emailFrom = "you@yourdomain.com" , emailTo = "person@example.com" , emailSubject = "This is an example email!" }
|
defaultEmail :: Email Source #
Email with template
data EmailWithTemplate Source #
EmailWithTemplate | |
|
Instances
ToJSON EmailWithTemplate Source # | |
Defined in Network.Api.Postmark.Data toJSON :: EmailWithTemplate -> Value # toEncoding :: EmailWithTemplate -> Encoding # toJSONList :: [EmailWithTemplate] -> Value # toEncodingList :: [EmailWithTemplate] -> Encoding # |
Track links
data TrackLinks Source #
When “link tracking” is enabled, Postmark will record statistics when a user clicks on a link in an email. You can use this feature to determine if a particular recipient has clicked a link that was emailed to them.
https://postmarkapp.com/developer/user-guide/tracking-links#enabling-link-tracking
None | No links will be replaced or tracked. |
HtmlAndText | Links will be replaced in both HTML and text bodies. |
HtmlOnly | Links will be replaced in only the HTML body. You may want this option if you do not want encoded tracking links to appear in the plain text of an email. |
TextOnly | Links will be replaced in only the text body. |
Instances
Show TrackLinks Source # | |
Defined in Network.Api.Postmark.Data showsPrec :: Int -> TrackLinks -> ShowS # show :: TrackLinks -> String # showList :: [TrackLinks] -> ShowS # | |
ToJSON TrackLinks Source # | |
Defined in Network.Api.Postmark.Data toJSON :: TrackLinks -> Value # toEncoding :: TrackLinks -> Encoding # toJSONList :: [TrackLinks] -> Value # toEncodingList :: [TrackLinks] -> Encoding # |
Attachment
data Attachment Source #
Instances
ToJSON Attachment Source # | |
Defined in Network.Api.Postmark.Data toJSON :: Attachment -> Value # toEncoding :: Attachment -> Encoding # toJSONList :: [Attachment] -> Value # toEncodingList :: [Attachment] -> Encoding # |
Response type
Internal Json tools
toText :: ByteString -> Text Source #