jhickner / smtp-mail

Making it easy to send SMTP email from Haskell
BSD 3-Clause "New" or "Revised" License
75 stars 32 forks source link

Need update with last versions of mime-mail and mime-mail-ses #24

Open delanoe opened 5 years ago

delanoe commented 5 years ago

Current versions on hackage cause null part error. But this bug is fixed with last versions of mime-mail and mime-mail-ses already: see: https://github.com/snoyberg/mime-mail Thanks for maintaining this library

DanBurton commented 5 years ago

Bump. I'm seeing the following compilation errors with mime-mail-0.5

[3 of 3] Compiling Network.Mail.SMTP ( Network/Mail/SMTP.hs, dist/build/Netwo$
k/Mail/SMTP.o )

Network/Mail/SMTP.hs:313:35: error:
    • Couldn't match expected type ‘Disposition’
                  with actual type ‘Maybe a1’
    • In the third argument of ‘Part’, namely ‘Nothing’
      In the first argument of ‘(.)’, namely
        ‘Part "text/plain; charset=utf-8" QuotedPrintableText Nothing []’
      In the expression:
        Part "text/plain; charset=utf-8" QuotedPrintableText Nothing []
          . TL.encodeUtf8
    |
313 |               QuotedPrintableText Nothing [] . TL.encodeUtf8
    |                                   ^^^^^^^

Network/Mail/SMTP.hs:313:48: error:
    • Couldn't match type ‘BL.ByteString’ with ‘PartContent’
      Expected type: TL.Text -> PartContent
        Actual type: TL.Text -> BL.ByteString
    • In the second argument of ‘(.)’, namely ‘TL.encodeUtf8’
      In the expression:
        Part "text/plain; charset=utf-8" QuotedPrintableText Nothing []
          . TL.encodeUtf8
      In an equation for ‘plainTextPart’:
          plainTextPart
            = Part "text/plain; charset=utf-8" QuotedPrintableText Nothing []
                . TL.encodeUtf8
    |
313 |               QuotedPrintableText Nothing [] . TL.encodeUtf8
    |                                                ^^^^^^^^^^^^^

Network/Mail/SMTP.hs:318:34: error:
    • Couldn't match expected type ‘Disposition’
                  with actual type ‘Maybe a0’
    • In the third argument of ‘Part’, namely ‘Nothing’
      In the first argument of ‘(.)’, namely
        ‘Part "text/html; charset=utf-8" QuotedPrintableText Nothing []’
      In the expression:
        Part "text/html; charset=utf-8" QuotedPrintableText Nothing []
          . TL.encodeUtf8
    |
318 |              QuotedPrintableText Nothing [] . TL.encodeUtf8
    |                                  ^^^^^^^

Network/Mail/SMTP.hs:318:47: error:
    • Couldn't match type ‘BL.ByteString’ with ‘PartContent’
      Expected type: TL.Text -> PartContent
        Actual type: TL.Text -> BL.ByteString
    • In the second argument of ‘(.)’, namely ‘TL.encodeUtf8’
      In the expression:
        Part "text/html; charset=utf-8" QuotedPrintableText Nothing []
          . TL.encodeUtf8
      In an equation for ‘htmlPart’:
          htmlPart
            = Part "text/html; charset=utf-8" QuotedPrintableText Nothing []
                . TL.encodeUtf8
    |
318 |              QuotedPrintableText Nothing [] . TL.encodeUtf8
    |                                               ^^^^^^^^^^^^^

Network/Mail/SMTP.hs:326:30: error:
    • Couldn't match expected type ‘Disposition’
                  with actual type ‘Maybe T.Text’
    • In the third argument of ‘Part’, namely
        ‘(Just $ T.pack (takeFileName fp))’
      In the second argument of ‘($)’, namely
        ‘Part ct Base64 (Just $ T.pack (takeFileName fp)) [] content’
      In a stmt of a 'do' block:
        return
          $ Part ct Base64 (Just $ T.pack (takeFileName fp)) [] content
    |
326 |     return $ Part ct Base64 (Just $ T.pack (takeFileName fp)) [] content
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Network/Mail/SMTP.hs:326:66: error:
    • Couldn't match expected type ‘PartContent’
                  with actual type ‘BL.ByteString’
    • In the fifth argument of ‘Part’, namely ‘content’
      In the second argument of ‘($)’, namely
        ‘Part ct Base64 (Just $ T.pack (takeFileName fp)) [] content’
      In a stmt of a 'do' block:
        return
          $ Part ct Base64 (Just $ T.pack (takeFileName fp)) [] content
    |
326 |     return $ Part ct Base64 (Just $ T.pack (takeFileName fp)) [] content
    |                                                                  ^^^^^^^