Client: PopClient

Isolated

Represents a POP Client, which interacts with a POP Server.

Constructor

Gets invoked during the email:PopClient initialization.

init (string host, string username, string password, *PopConfiguration clientConfig)
  • host string
  • Host of the POP Client

  • username string
  • Username of the POP Client

  • password string
  • Password of the POP Client

Remote Methods

receiveMessage

Reads a message.

close

Close the client.

receiveMessage

function receiveMessage(string folder, decimal timeout) returns Message | Error?
Isolated Function
Remote Function

Reads a message.

1email:Message|email:Error? emailResponse = popClient->receiveMessage();

Parameters

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

  • timeout decimal (default 0)
  • Polling timeout period in seconds

Return Type

(Message | Error?)

An email:Message 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

close

function close() returns Error?
Isolated Function
Remote Function

Close the client.

1email:Error? closeResponse = popClient->close();

Return Type

(Error?)

An email:Error if the recipient failed to close the client or else ()