packages feed

smtp-mail 0.1.4.2 → 0.1.4.3

raw patch · 2 files changed

+10/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Network/Mail/SMTP.hs view
@@ -121,14 +121,20 @@     do bsPutCrLf conn "DATA"        (code, _) <- parseResponse conn        unless (code == 354) $ fail "this server cannot accept any data."-       mapM_ sendLine $ split dat ++ [BS.pack "."]+       mapM_ sendLine $ split dat+       sendLine dot        parseResponse conn     where        sendLine = bsPutCrLf conn-      -- split on '\n' and remove any trailing '\r' from parts-      split = map stripCR . BS.lines+      split = map (padDot . stripCR) . BS.lines+      -- remove \r at the end of a line       stripCR s = if cr `BS.isSuffixOf` s then BS.init s else s+      -- duplicate . at the start of a line+      padDot s = if dot `BS.isPrefixOf` s then dot <> s else s       cr = BS.pack "\r"+      dot = BS.pack "."++ sendCommand (SMTPC conn _) (AUTH LOGIN username password) =     do bsPutCrLf conn command        _ <- parseResponse conn
smtp-mail.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                smtp-mail-version:             0.1.4.2+version:             0.1.4.3 synopsis:            Simple email sending via SMTP -- description:          homepage:            http://github.com/jhickner/smtp-mail