packages feed

mime-mail 0.1.0.1 → 0.2.0

raw patch · 2 files changed

+10/−8 lines, 2 filesdep +asciiPVP ok

version bump matches the API change (PVP)

Dependencies added: ascii

API changes (from Hackage documentation)

- Network.Mail.Mime: Mail :: [(String, String)] -> [Alternatives] -> Mail
+ Network.Mail.Mime: Mail :: [(Ascii, String)] -> [Alternatives] -> Mail
- Network.Mail.Mime: Part :: String -> Encoding -> Maybe String -> [(String, String)] -> ByteString -> Part
+ Network.Mail.Mime: Part :: String -> Encoding -> Maybe FilePath -> [(Ascii, String)] -> ByteString -> Part
- Network.Mail.Mime: mailHeaders :: Mail -> [(String, String)]
+ Network.Mail.Mime: mailHeaders :: Mail -> [(Ascii, String)]
- Network.Mail.Mime: partFilename :: Part -> Maybe String
+ Network.Mail.Mime: partFilename :: Part -> Maybe FilePath
- Network.Mail.Mime: partHeaders :: Part -> [(String, String)]
+ Network.Mail.Mime: partHeaders :: Part -> [(Ascii, String)]

Files

Network/Mail/Mime.hs view
@@ -38,6 +38,7 @@ import Data.Bits ((.&.), shiftR) import Data.Char (isAscii) import Data.Word (Word8)+import qualified Data.Ascii as A  -- | Generates a random sequence of alphanumerics of the given length. randomString :: RandomGen d => Int -> d -> (String, d)@@ -63,7 +64,7 @@ -- | An entire mail message. data Mail = Mail     { -- | All headers, including to, from subject.-      mailHeaders :: [(String, String)]+      mailHeaders :: [(A.Ascii, String)]     -- | A list of different sets of alternatives. As a concrete example:     --     -- > mailParts = [ [textVersion, htmlVersion], [attachment1], [attachment1]]@@ -86,12 +87,12 @@     , partEncoding :: Encoding     -- | The filename for this part, if it is to be sent with an attachemnt     -- disposition.-    , partFilename :: Maybe String-    , partHeaders :: [(String, String)]+    , partFilename :: Maybe FilePath+    , partHeaders :: [(A.Ascii, String)]     , partContent :: L.ByteString     } -type Headers = [(String, String)]+type Headers = [(A.Ascii, String)] type Pair = (Headers, Builder)  partToPair :: Part -> Pair@@ -168,9 +169,9 @@         , finalBuilder         ] -showHeader :: (String, String) -> Builder+showHeader :: (A.Ascii, String) -> Builder showHeader (k, v) = mconcat-    [ fromString k+    [ fromByteString $ A.toByteString k     , fromByteString ": "     , v''     , fromByteString "\n"@@ -181,7 +182,7 @@             then encodedWord v'             else fromLazyText v' -showBoundPart :: Boundary -> ([(String, String)], Builder) -> Builder+showBoundPart :: Boundary -> ([(A.Ascii, String)], Builder) -> Builder showBoundPart (Boundary b) (headers, content) = mconcat     [ fromByteString "--"     , fromString b
mime-mail.cabal view
@@ -1,5 +1,5 @@ Name:                mime-mail-Version:             0.1.0.1+Version:             0.2.0 Synopsis:            Compose MIME email messages. Description:         This package provides some high-level datatypes for declaring MIME email messages, functions for automatically composing these into bytestrings, and the ability to send bytestrings via the sendmail executable. You can also use any other library you wish to send via different methods, eg directly to SMTP. Homepage:            http://github.com/snoyberg/mime-mail@@ -23,6 +23,7 @@                  , blaze-builder       >= 0.2.1      && < 0.3                  , bytestring          >= 0.9.1      && < 0.10                  , text                >= 0.7        && < 0.12+                 , ascii               >= 0.0.2      && < 0.1  source-repository head   type:     git