/usr/share/doc/libghc-mime-mail-doc/html/mime-mail.txt is in libghc-mime-mail-doc 0.4.1.2-3build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Compose MIME email messages.
--
-- 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.
@package mime-mail
@version 0.4.1.2
module Network.Mail.Mime
-- | MIME boundary between parts of a message.
newtype Boundary
Boundary :: Text -> Boundary
unBoundary :: Boundary -> Text
-- | An entire mail message.
data Mail
Mail :: Address -> [Address] -> [Address] -> [Address] -> [(ByteString, Text)] -> [Alternatives] -> Mail
mailFrom :: Mail -> Address
mailTo :: Mail -> [Address]
mailCc :: Mail -> [Address]
mailBcc :: Mail -> [Address]
-- | Other headers, excluding from, to, cc and bcc.
mailHeaders :: Mail -> [(ByteString, Text)]
-- | A list of different sets of alternatives. As a concrete example:
--
-- <pre>
-- mailParts = [ [textVersion, htmlVersion], [attachment1], [attachment1]]
-- </pre>
--
-- Make sure when specifying alternatives to place the most preferred
-- version last.
mailParts :: Mail -> [Alternatives]
-- | A mail message with the provided <tt>from</tt> address and no other
-- fields filled in.
emptyMail :: Address -> Mail
data Address
Address :: Maybe Text -> Text -> Address
addressName :: Address -> Maybe Text
addressEmail :: Address -> Text
-- | Multiple alternative representations of the same data. For example,
-- you could provide a plain-text and HTML version of a message.
type Alternatives = [Part]
-- | A single part of a multipart message.
data Part
Part :: Text -> Encoding -> Maybe Text -> Headers -> ByteString -> Part
-- | content type
partType :: Part -> Text
partEncoding :: Part -> Encoding
-- | The filename for this part, if it is to be sent with an attachemnt
-- disposition.
partFilename :: Part -> Maybe Text
partHeaders :: Part -> Headers
partContent :: Part -> ByteString
-- | How to encode a single part. You should use <a>Base64</a> for binary
-- data.
data Encoding
None :: Encoding
Base64 :: Encoding
QuotedPrintableText :: Encoding
QuotedPrintableBinary :: Encoding
-- | Render a <a>Mail</a> with a given <a>RandomGen</a> for producing
-- boundaries.
renderMail :: RandomGen g => g -> Mail -> (ByteString, g)
-- | Like <a>renderMail</a>, but generates a random boundary.
renderMail' :: Mail -> IO ByteString
-- | Send a fully-formed email message via the default sendmail executable
-- with default options.
sendmail :: ByteString -> IO ()
-- | Send a fully-formed email message via the specified sendmail
-- executable with specified options.
sendmailCustom :: FilePath -> [String] -> ByteString -> IO ()
-- | Render an email message and send via the default sendmail executable
-- with default options.
renderSendMail :: Mail -> IO ()
-- | Render an email message and send via the specified sendmail executable
-- with specified options.
renderSendMailCustom :: FilePath -> [String] -> Mail -> IO ()
-- | A simple interface for generating an email with HTML and plain-text
-- alternatives and some file attachments.
--
-- Note that we use lazy IO for reading in the attachment contents.
simpleMail :: Address -> Address -> Text -> Text -> Text -> [(Text, FilePath)] -> IO Mail
-- | Generates a random sequence of alphanumerics of the given length.
randomString :: RandomGen d => Int -> d -> (String, d)
-- | The first parameter denotes whether the input should be treated as
-- text. If treated as text, then CRs will be stripped and LFs output as
-- CRLFs. If binary, then CRs and LFs will be escaped.
quotedPrintable :: Bool -> ByteString -> Builder
instance Random Boundary
|