Clients - email : ImapClient

Represents an IMAP Client, which interacts with an IMAP Server.

Constructor

__init

(string host, string username, string password, ImapConfig clientConfig)

  • host string
  • Host of the IMAP Client

  • username string
  • Username of the IMAP Client

  • password string
  • Password of the IMAP Client

  • clientConfig ImapConfig {}
  • Configurations for the IMAP Client

Remote Methods

read Reads a message.
 email:Email|email:Error emailResponse = imapClient->read();

read

(string folder)

returns Email | Error | ()

Reads a message.

 email:Email|email:Error emailResponse = imapClient->read();

Parameters

  • folder string (default DEFAULT_FOLDER)
  • Folder to read emails. The default value is INBOX

  • Return Type

    (Email | Error | ())
  • Anemail:Email if reading the message is successful, () if there are no emails in the specified folder, or else an email:Error if the recipient failed to receive the message