diff options
Diffstat (limited to 'src/server/SendMail.hs')
-rw-r--r-- | src/server/SendMail.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/SendMail.hs b/src/server/SendMail.hs index 7d537fc..e434b38 100644 --- a/src/server/SendMail.hs +++ b/src/server/SendMail.hs @@ -7,6 +7,8 @@ module SendMail import Data.Text (Text) import qualified Data.Text as T import Data.Either (isLeft) +import qualified Data.Text.Lazy as LT +import Data.Text.Lazy.Builder (toLazyText, fromText) import Control.Exception (SomeException, try) import Control.Arrow (left) @@ -28,7 +30,7 @@ getMimeMail (Mail mailFrom mailTo mailSubject mailPlainBody) = let fromMail = M.emptyMail (address mailFrom) in fromMail { M.mailTo = map address mailTo - , M.mailParts = [ [ M.plainPart mailPlainBody ] ] + , M.mailParts = [ [ M.plainPart . strictToLazy $ mailPlainBody ] ] , M.mailHeaders = [("Subject", mailSubject)] } @@ -38,3 +40,6 @@ address addressEmail = { M.addressName = Nothing , M.addressEmail = addressEmail } + +strictToLazy :: Text -> LT.Text +strictToLazy = toLazyText . fromText |