Safe Haskell | None |
---|---|
Language | Haskell98 |
- 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 | |
|
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. |
Attachment
data Attachment Source #
Response type
Internal Json tools
toText :: ByteString -> Text Source #