-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Client support for POP3, SMTP, and IMAP -- -- This package provides client support for the POP3, SMTP, and IMAP -- protocols. -- -- Full examples can be found in the repository. Additional -- documentation on the major updates can be found in the -- Updating.md file @package HaskellNet @version 0.6.1.2 module Network.HaskellNet.Auth type UserName = String type Password = String -- | Authorization types supported by the RFC5954 data AuthType PLAIN :: AuthType LOGIN :: AuthType CRAM_MD5 :: AuthType XOAUTH2 :: AuthType b64Encode :: String -> String b64Decode :: String -> String showOctet :: [Word8] -> String hashMD5 :: [Word8] -> [Word8] hmacMD5 :: String -> String -> [Word8] plain :: UserName -> Password -> String login :: UserName -> Password -> (String, String) cramMD5 :: String -> UserName -> Password -> String auth :: AuthType -> String -> UserName -> Password -> String instance GHC.Classes.Eq Network.HaskellNet.Auth.AuthType instance GHC.Show.Show Network.HaskellNet.Auth.AuthType -- | This module provides a byte string "stream" interface. This interface -- provides some common operations on a value which supports reading and -- writing byte strings. module Network.HaskellNet.BSStream -- | A byte string stream. data BSStream BSStream :: IO ByteString -> (Int -> IO ByteString) -> (ByteString -> IO ()) -> IO () -> IO () -> IO Bool -> (Int -> IO Bool) -> BSStream -- | Read a line from the stream. Should return the line which was read, -- including the newline. [bsGetLine] :: BSStream -> IO ByteString -- | Read the specified number of bytes from the stream. Should block until -- the requested bytes can be read. [bsGet] :: BSStream -> Int -> IO ByteString -- | Write the specified byte string to the stream. Should flush the stream -- after writing. [bsPut] :: BSStream -> ByteString -> IO () -- | Flush the stream. [bsFlush] :: BSStream -> IO () -- | Close the stream. [bsClose] :: BSStream -> IO () -- | Is the stream open? [bsIsOpen] :: BSStream -> IO Bool -- | Is data available? [bsWaitForInput] :: BSStream -> Int -> IO Bool -- | Build a byte string stream which operates on a Handle. handleToStream :: Handle -> BSStream module Network.HaskellNet.Debug debugStream :: BSStream -> BSStream module Network.HaskellNet.POP3.Connection data POP3Connection stream :: POP3Connection -> BSStream newConnection :: BSStream -> String -> POP3Connection -- | APOP key apopKey :: POP3Connection -> String module Network.HaskellNet.POP3.Types data Command USER :: UserName -> Command PASS :: Password -> Command APOP :: UserName -> Password -> Command AUTH :: AuthType -> UserName -> Password -> Command NOOP :: Command QUIT :: Command STAT :: Command LIST :: Maybe Int -> Command DELE :: Int -> Command RETR :: Int -> Command RSET :: Command TOP :: Int -> Int -> Command UIDL :: Maybe Int -> Command data Response Ok :: Response Err :: Response instance GHC.Show.Show Network.HaskellNet.POP3.Types.Response instance GHC.Classes.Eq Network.HaskellNet.POP3.Types.Response module Network.HaskellNet.POP3 -- | connecting to the pop3 server specified by the hostname and port -- number connectPop3Port :: String -> PortNumber -> IO POP3Connection -- | connecting to the pop3 server specified by the hostname. 110 is used -- for the port number. connectPop3 :: String -> IO POP3Connection -- | connecting to the pop3 server via a stream connectStream :: BSStream -> IO POP3Connection -- | sendCommand sends a pop3 command via a pop3 connection. This action is -- too generic. Use more specific actions sendCommand :: POP3Connection -> Command -> IO (Response, ByteString) closePop3 :: POP3Connection -> IO () user :: POP3Connection -> String -> IO () pass :: POP3Connection -> String -> IO () userPass :: POP3Connection -> UserName -> Password -> IO () apop :: POP3Connection -> String -> String -> IO () auth :: POP3Connection -> AuthType -> UserName -> Password -> IO () stat :: POP3Connection -> IO (Int, Int) dele :: POP3Connection -> Int -> IO () retr :: POP3Connection -> Int -> IO ByteString top :: POP3Connection -> Int -> Int -> IO ByteString rset :: POP3Connection -> IO () allList :: POP3Connection -> IO [(Int, Int)] list :: POP3Connection -> Int -> IO Int allUIDLs :: POP3Connection -> IO [(Int, ByteString)] uidl :: POP3Connection -> Int -> IO ByteString doPop3Port :: String -> PortNumber -> (POP3Connection -> IO a) -> IO a doPop3 :: String -> (POP3Connection -> IO a) -> IO a doPop3Stream :: BSStream -> (POP3Connection -> IO b) -> IO b -- | Authorization types supported by the RFC5954 data AuthType PLAIN :: AuthType LOGIN :: AuthType CRAM_MD5 :: AuthType XOAUTH2 :: AuthType -- | Internal functions that are used in the SMTP protocol, you may need -- these module in case if you want to implement additional functionality -- that does not exist in the Network.HaskellNet.SMTP. -- -- Example. -- -- One example could be sending multiple emails over the same stream in -- order to use that you may want to use RSET command, so you can -- implement: -- --
--   import Network.HaskellNet.SMTP.Internal
--   
--   resetConnection :: SMTPConnection -> IO ()
--   resetConnection conn = do
--      (code, _) <- sendCommand conn RSET
--      unless (code == 250) $ throwIO $ UnexpectedReply RSET [250] code ""
--   
module Network.HaskellNet.SMTP.Internal -- | All communication with server is done using SMTPConnection -- value. data SMTPConnection SMTPC :: !BSStream -> ![ByteString] -> SMTPConnection -- | Connection communication channel. [bsstream] :: SMTPConnection -> !BSStream -- | Server properties as per reply to the EHLO request. [_response] :: SMTPConnection -> ![ByteString] -- | SMTP commands. -- -- Supports basic and extended SMTP protocol without TLS support. -- -- For each command we provide list of the expected reply codes that -- happens in success and failure cases respectively. data Command -- | The HELO command initiates the SMTP session conversation. The -- client greets the server and introduces itself. As a rule, HELO is -- attributed with an argument that specifies the domain name or IP -- address of the SMTP client. -- -- Success: 250 Failure: 504, 550 HELO :: Text -> Command -- | EHLO is an alternative to HELO for servers that support the -- SMTP service extensions (ESMTP) -- -- Success: 250 Failure: 502, 504, 550 EHLO :: Text -> Command -- | MAIL FROM command initiates a mail transfer. As an argument, -- MAIL FROM includes a sender mailbox (reverse-path) can accept optional -- parameters. -- -- Success: 250 -- -- Failure: 451, 452, 455, 503, 550, 552, 553, 555 MAIL :: Text -> Command -- | The RCPT TO command specifies exactly one recipient. -- -- Success: 250 251 -- -- Failure: 450 451 452 455 503 550 551 552 553 555 RCPT :: Text -> Command -- | With the DATA command, the client asks the server for -- permission to transfer the mail data. -- -- Success: 250, 354 -- -- Failure: 450 451 452 503 550 552 554 -- -- Client just sends data and after receiving 354 starts streaming email, -- terminating transfer by sending rn.rn. DATA :: ByteString -> Command -- | EXPN is used to verify whether a mailing list in the argument -- exists on the local host. The positive response will specify the -- membership of the recipients. -- -- Success: 250 252 -- -- Failure: 502 504 550 EXPN :: Text -> Command -- | VRFY is used to verify whether a mailbox in the argument -- exists on the local host. The server response includes the user’s -- mailbox and may include the user’s full name. -- -- Success: 250 251 252 -- -- Failure: 502 504 550 551 553 VRFY :: Text -> Command -- | With the HELP command, the client requests a list of commands -- the server supports, may request help for specific command -- -- Success: 211 214 -- -- Failure: 502 504 HELP :: Text -> Command -- | Authorization support AUTH :: AuthType -> UserName -> Password -> Command -- | NOOP can be used to verify if the connection is alive -- -- Success: 250 NOOP :: Command -- | RSET Resets the state -- -- Success: 250 RSET :: Command -- | QUIT asks server to close connection. Client should terminate -- the connection when receives status. -- -- Success: 221 QUIT :: Command -- | Exceptions that can happen during communication. data SMTPException -- | Reply code was not in the list of expected. -- -- UnexpectedReply :: Command -> [ReplyCode] -> ReplyCode -> ByteString -> SMTPException -- | The server didn't accept the start of the message delivery NotConfirmed :: ReplyCode -> ByteString -> SMTPException -- | The server does not support current authentication method AuthNegotiationFailed :: ReplyCode -> ByteString -> SMTPException -- | Can't send email because no recipients were specified. NoRecipients :: Mail -> SMTPException -- | Received an unexpected greeting from the server. UnexpectedGreeting :: ReplyCode -> SMTPException -- | Code reply from the server. It's always 3 digit integer. type ReplyCode = Int -- | Safe wrapper for running a client command over the SMTP connection. -- -- Note on current behavior -- -- We allow the command to fail several times, retry happens in case if -- we have received unexpected status code. In this case message will be -- sent again. However in case of other synchronous or asynchronous -- exceptions there will be no retries. -- -- It case if number of retries were exceeded connection will be closed -- automatically. -- -- The behaviors in notes will likely be changed in the future and should -- not be relied upon, see issues 76, 77. tryCommand :: SMTPConnection -> Command -> Int -> [ReplyCode] -> IO ByteString -- | Read response from the stream. Response consists of the code and one -- or more lines of data. -- -- In case if it's not the last line of reply the code is followed by the -- - sign. We return the code and all the data with the code -- stripped. -- -- Eg.: -- --
--   "250-8BITMIME\r"
--   "250-PIPELINING\r"
--   "250-SIZE 42991616\r"
--   "250-AUTH LOGIN PLAIN XOAUTH2\r"
--   "250-DSN\r"
--   "250 ENHANCEDSTATUSCODES\r"
--   
-- -- Returns: -- --
--   (250, "8BITMIME\nPIPELININGnSIZE 42991616\nAUTH LOGIN PLAIN XOAUTH2\nDSN\nENHANCEDSTATUSCODES")
--   
-- -- Throws SMTPException. parseResponse :: BSStream -> IO (ReplyCode, ByteString) -- | Sends a Command to the server. Function that performs all the -- logic for sending messages. Throws an exception if something goes -- wrong. -- -- Throws SMTPException. sendCommand :: SMTPConnection -> Command -> IO (ReplyCode, ByteString) -- | Sends a mail to the server. -- -- Throws SMTPException. sendMailData :: Address -> [Address] -> ByteString -> SMTPConnection -> IO () -- | Terminates the connection. Quit command is not send in this -- case. It's safe to issue this command at any time if the connection is -- still open. closeSMTP :: SMTPConnection -> IO () -- | Gracefully closes SMTP connection. Connection should be in available -- state. First it sends quit command and then closes connection itself. -- Connection should not be used after this command exits (even if it -- exits with an exception). This command may throw an exception in case -- of network failure or protocol failure when sending QUIT -- command. If it happens connection nevertheless is closed. gracefullyCloseSMTP :: SMTPConnection -> IO () -- | Sends quit to the server. Connection must be terminated afterwards, -- i.e. it's not allowed to issue any command on this connection. quitSMTP :: SMTPConnection -> IO () data Address Address :: Maybe Text -> Text -> Address [addressName] :: Address -> Maybe Text [addressEmail] :: Address -> Text instance GHC.Classes.Eq Network.HaskellNet.SMTP.Internal.Command instance GHC.Show.Show Network.HaskellNet.SMTP.Internal.Command instance GHC.Show.Show Network.HaskellNet.SMTP.Internal.SMTPException instance GHC.Exception.Type.Exception Network.HaskellNet.SMTP.Internal.SMTPException -- | This module provides functions client side of the SMTP protocol. -- -- A basic usage example: -- --
--   {-# LANGUAGE OverloadedStrings #-}
--   import Network.HaskellNet.SMTP
--   import Network.HaskellNet.Auth
--   import Network.Mail.Mime
--   import System.Exit (die)
--   
--   main :: IO ()
--   main = doSMTP "your.smtp.server.com" $ \conn -> do -- (1)
--      authSucceed <- authenticate PLAIN "username" "password" conn -- (2)
--      if authSucceed
--      then do
--        let mail = simpleMail'
--              "receiver@server.com"
--              "sender@server.com"
--              "subject"
--              "Hello! This is the mail body!"
--        sendMail mail conn -- (3)
--      else die "Authentication failed."
--   
-- -- Notes for the above example: -- -- -- -- N.B. For SSL/TLS support you may establish the -- connection using the functions (such as connectSMTPSSL) -- provided by the Network.HaskellNet.SMTP.SSL module of the -- HaskellNet-SSL package. module Network.HaskellNet.SMTP -- | All communication with server is done using SMTPConnection -- value. data SMTPConnection -- | doSMTPPort opens a connection to the given port server and -- performs an IO action with the connection, and then close it. -- -- SMTPConnection is freed once IO action scope is -- finished, it means that SMTPConnection value should not escape -- the action scope. doSMTPPort :: String -> PortNumber -> (SMTPConnection -> IO a) -> IO a -- | doSMTP is similar to doSMTPPort, except that it does not -- require port number and connects to the default SMTP port — 25. doSMTP :: String -> (SMTPConnection -> IO a) -> IO a -- | doSMTPStream is similar to doSMTPPort, except that its -- argument is a Stream data instead of hostname and port number. Using -- this function you can embed connections maintained by the other -- libraries or add debug info in a common way. -- -- Using this function you can create an SMTPConnection from an -- already opened connection stream. See more info on the -- BStream abstraction in the Network.HaskellNet.BSStream -- module. doSMTPStream :: BSStream -> (SMTPConnection -> IO a) -> IO a -- | Authenticates user on the remote server. Returns True if the -- authentication succeeds, otherwise returns False. -- -- Usage example: -- --
--   {-# LANGUAGE OverloadedStrings #-}
--   authSucceed <- authenticate PLAIN "username" "password" conn
--   if authSucceed
--   then sendPlainTextMail "receiver@server.com" "sender@server.com" "subject" "Hello!" conn
--   else print "Authentication failed."
--   
authenticate :: AuthType -> UserName -> Password -> SMTPConnection -> IO Bool -- | Authorization types supported by the RFC5954 data AuthType PLAIN :: AuthType LOGIN :: AuthType CRAM_MD5 :: AuthType XOAUTH2 :: AuthType -- | Sends email using Mail type from the mime-mail package. -- -- Sender is taken from the mailFrom field of the mail. -- Message is sent to all the recipients in the mailTo, -- mailCc, mailBcc fields. But mailBcc emails are -- not visible to other recipients as it should be. sendMail :: HasCallStack => Mail -> SMTPConnection -> IO () -- | Send a plain text mail. -- -- DEPRECATED. Instead of sendPlainTextMail to from subject -- plainBody use: -- --
--   mail = simpleMail' to from subject plainBody
--   sendMail mail conn
--   
-- | Deprecated: Use 'sendMail (Network.Mail.Mime.simpleMail' to from -- subject plainBody)' instead sendPlainTextMail :: Address -> Address -> Text -> Text -> SMTPConnection -> IO () -- | Send a mime mail. The attachments are included with the file path. -- -- DEPRECATED. Instead of sendMimeMail to from subject -- plainBody htmlBody attachments use: -- --
--   mail <- simpleMail to from subject plainBody htmlBody attachments
--   sendMail mail conn
--   
-- | Deprecated: Use 'Network.Mail.Mime.simpleMail to from subject -- plainBody htmlBody attachments >>= mail -> sendMail mail -- conn' instead sendMimeMail :: Address -> Address -> Text -> Text -> Text -> [(Text, FilePath)] -> SMTPConnection -> IO () -- | Send a mime mail. The attachments are included with in-memory -- ByteString. -- -- DEPRECATED. Instead of sendMimeMail to from subject -- plainBody htmlBody attachments use: -- --
--   let mail = Network.Mail.Mime.simpleMailInMemory to from subject plainBody htmlBody attachments
--   sendMail mail conn
--   
-- | Deprecated: Use 'sendMail (Network.Mail.Mime.simpleMailInMemory to -- from subject plainBody htmlBody attachments) conn' sendMimeMail' :: Address -> Address -> Text -> Text -> Text -> [(Text, Text, ByteString)] -> SMTPConnection -> IO () -- | Sends email in generated using 'mime-mail' package. -- -- Throws UserError :: IOError if recipient -- address not specified. -- | Deprecated: Use sendMail instead sendMimeMail2 :: HasCallStack => Mail -> SMTPConnection -> IO () -- | connecting SMTP server with the specified name and port number. connectSMTPPort :: String -> PortNumber -> IO SMTPConnection -- | connecting SMTP server with the specified name and port 25. connectSMTP :: String -> IO SMTPConnection -- | Create SMTPConnection from already connected Stream -- -- Throws CantConnect :: SMTPException in case if got illegal -- greeting. connectStream :: HasCallStack => BSStream -> IO SMTPConnection -- | Terminates the connection. Quit command is not send in this -- case. It's safe to issue this command at any time if the connection is -- still open. closeSMTP :: SMTPConnection -> IO () -- | Gracefully closes SMTP connection. Connection should be in available -- state. First it sends quit command and then closes connection itself. -- Connection should not be used after this command exits (even if it -- exits with an exception). This command may throw an exception in case -- of network failure or protocol failure when sending QUIT -- command. If it happens connection nevertheless is closed. gracefullyCloseSMTP :: SMTPConnection -> IO () -- | Exceptions that can happen during communication. data SMTPException -- | Reply code was not in the list of expected. -- -- UnexpectedReply :: Command -> [ReplyCode] -> ReplyCode -> ByteString -> SMTPException -- | The server didn't accept the start of the message delivery NotConfirmed :: ReplyCode -> ByteString -> SMTPException -- | The server does not support current authentication method AuthNegotiationFailed :: ReplyCode -> ByteString -> SMTPException -- | Can't send email because no recipients were specified. NoRecipients :: Mail -> SMTPException -- | Received an unexpected greeting from the server. UnexpectedGreeting :: ReplyCode -> SMTPException module Network.HaskellNet.IMAP.Types type MailboxName = String type GmailLabel = String type UID = Word64 type Charset = String data MailboxInfo MboxInfo :: MailboxName -> Integer -> Integer -> [Flag] -> [Flag] -> Bool -> Bool -> UID -> UID -> MailboxInfo [_mailbox] :: MailboxInfo -> MailboxName [_exists] :: MailboxInfo -> Integer [_recent] :: MailboxInfo -> Integer [_flags] :: MailboxInfo -> [Flag] [_permanentFlags] :: MailboxInfo -> [Flag] [_isWritable] :: MailboxInfo -> Bool [_isFlagWritable] :: MailboxInfo -> Bool [_uidNext] :: MailboxInfo -> UID [_uidValidity] :: MailboxInfo -> UID data Flag Seen :: Flag Answered :: Flag Flagged :: Flag Deleted :: Flag Draft :: Flag Recent :: Flag Keyword :: String -> Flag data Attribute Noinferiors :: Attribute Noselect :: Attribute Marked :: Attribute Unmarked :: Attribute OtherAttr :: String -> Attribute data MboxUpdate MboxUpdate :: Maybe Integer -> Maybe Integer -> MboxUpdate [exists] :: MboxUpdate -> Maybe Integer [recent] :: MboxUpdate -> Maybe Integer data StatusCode ALERT :: StatusCode BADCHARSET :: [Charset] -> StatusCode CAPABILITY_sc :: [String] -> StatusCode PARSE :: StatusCode PERMANENTFLAGS :: [Flag] -> StatusCode READ_ONLY :: StatusCode READ_WRITE :: StatusCode TRYCREATE :: StatusCode UIDNEXT_sc :: UID -> StatusCode UIDVALIDITY_sc :: UID -> StatusCode UNSEEN_sc :: Integer -> StatusCode data ServerResponse OK :: Maybe StatusCode -> String -> ServerResponse NO :: Maybe StatusCode -> String -> ServerResponse BAD :: Maybe StatusCode -> String -> ServerResponse PREAUTH :: Maybe StatusCode -> String -> ServerResponse -- | the query data type for the status command data MailboxStatus -- | the number of messages in the mailbox MESSAGES :: MailboxStatus -- | the number of messages with the Recent flag set RECENT :: MailboxStatus -- | the next unique identifier value of the mailbox UIDNEXT :: MailboxStatus -- | the unique identifier validity value of the mailbox UIDVALIDITY :: MailboxStatus -- | the number of messages with the Unseen flag set UNSEEN :: MailboxStatus data RespDerivs RespDerivs :: Result RespDerivs [Flag] -> Result RespDerivs String -> Result RespDerivs Char -> Pos -> RespDerivs [dvFlags] :: RespDerivs -> Result RespDerivs [Flag] [advTag] :: RespDerivs -> Result RespDerivs String [advChar] :: RespDerivs -> Result RespDerivs Char [advPos] :: RespDerivs -> Pos emptyMboxInfo :: MailboxInfo instance GHC.Classes.Eq Network.HaskellNet.IMAP.Types.Flag instance GHC.Classes.Eq Network.HaskellNet.IMAP.Types.MailboxInfo instance GHC.Show.Show Network.HaskellNet.IMAP.Types.MailboxInfo instance GHC.Classes.Eq Network.HaskellNet.IMAP.Types.Attribute instance GHC.Show.Show Network.HaskellNet.IMAP.Types.Attribute instance GHC.Classes.Eq Network.HaskellNet.IMAP.Types.MboxUpdate instance GHC.Show.Show Network.HaskellNet.IMAP.Types.MboxUpdate instance GHC.Show.Show Network.HaskellNet.IMAP.Types.StatusCode instance GHC.Classes.Eq Network.HaskellNet.IMAP.Types.StatusCode instance GHC.Show.Show Network.HaskellNet.IMAP.Types.ServerResponse instance GHC.Classes.Eq Network.HaskellNet.IMAP.Types.ServerResponse instance GHC.Classes.Eq Network.HaskellNet.IMAP.Types.MailboxStatus instance GHC.Read.Read Network.HaskellNet.IMAP.Types.MailboxStatus instance GHC.Show.Show Network.HaskellNet.IMAP.Types.MailboxStatus instance Text.Packrat.Parse.Derivs Network.HaskellNet.IMAP.Types.RespDerivs instance GHC.Show.Show Network.HaskellNet.IMAP.Types.Flag module Network.HaskellNet.IMAP.Connection data IMAPConnection withNextCommandNum :: IMAPConnection -> (Int -> IO a) -> IO (a, Int) setMailboxInfo :: IMAPConnection -> MailboxInfo -> IO () modifyMailboxInfo :: IMAPConnection -> (MailboxInfo -> MailboxInfo) -> IO () newConnection :: BSStream -> IO IMAPConnection mailbox :: IMAPConnection -> IO MailboxName exists :: IMAPConnection -> IO Integer recent :: IMAPConnection -> IO Integer flags :: IMAPConnection -> IO [Flag] permanentFlags :: IMAPConnection -> IO [Flag] isWritable :: IMAPConnection -> IO Bool isFlagWritable :: IMAPConnection -> IO Bool uidNext :: IMAPConnection -> IO UID uidValidity :: IMAPConnection -> IO UID stream :: IMAPConnection -> BSStream -- | Parsers for IMAP server responses module Network.HaskellNet.IMAP.Parsers eval :: (RespDerivs -> Result RespDerivs r) -> String -> ByteString -> r eval' :: (RespDerivs -> Result RespDerivs r) -> String -> String -> r pNone :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, ()) pCapability :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [String]) pSelect :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, MailboxInfo) pList :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, MailboxName)]) pLsub :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, MailboxName)]) pStatus :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(MailboxStatus, Integer)]) pExpunge :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [Integer]) pSearch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [UID]) pFetch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(Integer, [(String, String)])]) module Network.HaskellNet.IMAP connectIMAP :: String -> IO IMAPConnection connectIMAPPort :: String -> PortNumber -> IO IMAPConnection connectStream :: BSStream -> IO IMAPConnection noop :: IMAPConnection -> IO () capability :: IMAPConnection -> IO [String] logout :: IMAPConnection -> IO () login :: IMAPConnection -> UserName -> Password -> IO () authenticate :: IMAPConnection -> AuthType -> UserName -> Password -> IO () select :: IMAPConnection -> MailboxName -> IO () examine :: IMAPConnection -> MailboxName -> IO () create :: IMAPConnection -> MailboxName -> IO () delete :: IMAPConnection -> MailboxName -> IO () rename :: IMAPConnection -> MailboxName -> MailboxName -> IO () subscribe :: IMAPConnection -> MailboxName -> IO () unsubscribe :: IMAPConnection -> MailboxName -> IO () list :: IMAPConnection -> IO [([Attribute], MailboxName)] lsub :: IMAPConnection -> IO [([Attribute], MailboxName)] status :: IMAPConnection -> MailboxName -> [MailboxStatus] -> IO [(MailboxStatus, Integer)] append :: IMAPConnection -> MailboxName -> ByteString -> IO () appendFull :: IMAPConnection -> MailboxName -> ByteString -> Maybe [Flag] -> Maybe CalendarTime -> IO () check :: IMAPConnection -> IO () close :: IMAPConnection -> IO () expunge :: IMAPConnection -> IO [Integer] search :: IMAPConnection -> [SearchQuery] -> IO [UID] store :: IMAPConnection -> UID -> FlagsQuery -> IO () copy :: IMAPConnection -> UID -> MailboxName -> IO () idle :: IMAPConnection -> Int -> IO () fetch :: IMAPConnection -> UID -> IO ByteString fetchHeader :: IMAPConnection -> UID -> IO ByteString fetchSize :: IMAPConnection -> UID -> IO Int fetchHeaderFields :: IMAPConnection -> UID -> [String] -> IO ByteString fetchHeaderFieldsNot :: IMAPConnection -> UID -> [String] -> IO ByteString fetchFlags :: IMAPConnection -> UID -> IO [Flag] fetchR :: IMAPConnection -> (UID, UID) -> IO [(UID, ByteString)] fetchByString :: IMAPConnection -> UID -> String -> IO [(String, String)] fetchByStringR :: IMAPConnection -> (UID, UID) -> String -> IO [(UID, [(String, String)])] data Flag Seen :: Flag Answered :: Flag Flagged :: Flag Deleted :: Flag Draft :: Flag Recent :: Flag Keyword :: String -> Flag data Attribute Noinferiors :: Attribute Noselect :: Attribute Marked :: Attribute Unmarked :: Attribute OtherAttr :: String -> Attribute -- | the query data type for the status command data MailboxStatus -- | the number of messages in the mailbox MESSAGES :: MailboxStatus -- | the number of messages with the Recent flag set RECENT :: MailboxStatus -- | the next unique identifier value of the mailbox UIDNEXT :: MailboxStatus -- | the unique identifier validity value of the mailbox UIDVALIDITY :: MailboxStatus -- | the number of messages with the Unseen flag set UNSEEN :: MailboxStatus data SearchQuery ALLs :: SearchQuery FLAG :: Flag -> SearchQuery UNFLAG :: Flag -> SearchQuery BCCs :: String -> SearchQuery BEFOREs :: CalendarTime -> SearchQuery BODYs :: String -> SearchQuery CCs :: String -> SearchQuery FROMs :: String -> SearchQuery HEADERs :: String -> String -> SearchQuery LARGERs :: Integer -> SearchQuery NEWs :: SearchQuery NOTs :: SearchQuery -> SearchQuery OLDs :: SearchQuery ONs :: CalendarTime -> SearchQuery ORs :: SearchQuery -> SearchQuery -> SearchQuery SENTBEFOREs :: CalendarTime -> SearchQuery SENTONs :: CalendarTime -> SearchQuery SENTSINCEs :: CalendarTime -> SearchQuery SINCEs :: CalendarTime -> SearchQuery SMALLERs :: Integer -> SearchQuery SUBJECTs :: String -> SearchQuery TEXTs :: String -> SearchQuery TOs :: String -> SearchQuery XGMRAW :: String -> SearchQuery UIDs :: [UID] -> SearchQuery data FlagsQuery ReplaceFlags :: [Flag] -> FlagsQuery PlusFlags :: [Flag] -> FlagsQuery MinusFlags :: [Flag] -> FlagsQuery ReplaceGmailLabels :: [GmailLabel] -> FlagsQuery PlusGmailLabels :: [GmailLabel] -> FlagsQuery MinusGmailLabels :: [GmailLabel] -> FlagsQuery -- | Authorization types supported by the RFC5954 data AuthType PLAIN :: AuthType LOGIN :: AuthType CRAM_MD5 :: AuthType XOAUTH2 :: AuthType instance GHC.Show.Show Network.HaskellNet.IMAP.SearchQuery