More strict emails

This commit is contained in:
2020-12-11 17:53:08 +02:00
parent a4da4f73da
commit 7f6b318fcb
2 changed files with 7 additions and 5 deletions

View File

@ -17,9 +17,11 @@ sample :: ByteString
sample =
"Subject: Hello worldddd\n\
\From: me@example.com\n\
\Dkim: asd\n\
\To: you <you@example.com>\n\
\ \n\n \
\foo"
\\n\n\
\From: foo bar <a mailto=\"me2@example.com\" />\n\
\asd\n"
parseToList :: ByteString -> IO [Header]
parseToList _ = runConduit (CB.sourceLbs sample .| parseEmail .| CL.consume)