2020-12-10 23:13:23 +02:00
|
|
|
{-# LANGUAGE TypeApplications #-}
|
2020-12-10 22:22:46 +02:00
|
|
|
module Data.Email where
|
|
|
|
|
|
|
|
import Data.Email.Header
|
|
|
|
|
|
|
|
import Conduit
|
|
|
|
import qualified Data.Conduit.Combinators as C
|
|
|
|
|
|
|
|
import Data.ByteString
|
|
|
|
(ByteString)
|
|
|
|
|
2020-12-10 23:13:23 +02:00
|
|
|
parseEmail :: (MonadUnliftIO m, MonadThrow m, Monad m) => ConduitM ByteString Header m ()
|
2021-10-29 22:41:46 +03:00
|
|
|
parseEmail = C.linesUnboundedAscii .| C.concatMap decode
|