Function API only Updated 22 Oct 2026
pop3.pop(options)
Retrieves a list of mails in inbox ready for download from server.
Parameters
optionsobject | stringrequiredPOP3 options object: hostname, port (default 110), useSsl (default false — a plain connection; true for TLS, typically port 995), username and password. Or pass the path to a document under #/ that holds these values, such as "#/My Pop3": a path reads the values of that document, the same as docly.getJson("#/My Pop3"). Throws "Mail configuration document not found" if there is no such document.
Returns
A list with one object per message: Number, Identifier (the unique id that pop3.get, pop3.getHeader and pop3.delete take) and Size in bytes.
Example
Normal JavaScript, running in the browser or on the Docly™ server.
// Configure options
let options = {
"hostname" : "serverhost",
"port" : 110,
"useSsl" : false,
"username" : "login",
"password" : "pass"
};
// Retrieve list of mail in inbox
let list = pop3.pop(options);
// Return content
return list;
/*
Each item with the following properties:
- Number
- Identifier
- Size
*/