@@ -26,7 +26,6 @@ import qualified Data.HashMap.Strict as H
2626import Data.Monoid
2727import qualified Data.Text as T
2828import Data.Time
29−import Lens.Micro
3029import Network.API.Mandrill.Messages as M
3130import Network.API.Mandrill.Messages.Types as M
3231import Network.API.Mandrill.Trans as M
@@ -107,7 +106,7 @@ newHtmlMessage :: EmailAddress
107106 -- ^ The HTML body
108107 -> MandrillMessage
109108newHtmlMessage f t subj html = let body = mkMandrillHtml html in
110− ((mmsg_html .~ body) . (mmsg_subject .~ subj)) $ (emptyMessage f t)
109+ (emptyMessage f t) { _mmsg_html = body, _mmsg_subject = subj }
111110
112111--------------------------------------------------------------------------------
113112-- | Create a new template message (no HTML).
@@ -118,7 +117,7 @@ newTemplateMessage :: EmailAddress
118117 -> T.Text
119118 -- ^ Subject
120119 -> MandrillMessage
121−newTemplateMessage f t subj = (mmsg_subject .~ subj) $ (emptyMessage f t)
120+newTemplateMessage f t subj = (emptyMessage f t) { _mmsg_subject = subj }
122121
123122--------------------------------------------------------------------------------
124123-- | Create a new textual message. By default Mandrill doesn't require you
@@ -134,9 +133,11 @@ newTextMessage :: EmailAddress
134133 -- ^ The body, as normal text.
135134 -> MandrillMessage
136135newTextMessage f t subj txt = let body = unsafeMkMandrillHtml txt in
137− ((mmsg_html .~ body) .
138− (mmsg_text .~ Just txt) .
139− (mmsg_subject .~ subj)) (emptyMessage f t)
136+ (emptyMessage f t) {
137+ _mmsg_html = body
138+ , _mmsg_text = Just txt
139+ , _mmsg_subject = subj
140+ }
140141
141142
142143--------------------------------------------------------------------------------