Function API only Updated 22 Oct 2026
pop3.getHeader(options, identifier)
Gets the header fields for a single email message from POP3 server into a variable.
Parameters
optionsobject | stringrequiredPOP3 options object with hostname, port, useSsl, 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.
identifierstring | string[]requiredMail identifier for the message, or an array of identifiers (supported since 15 October 2026). Identifiers come from pop3.pop(options).
Returns
Message header object with properties for subject, etc. but not the body and not the attachments.
If an array of identifiers was supplied, and array of objects will also be returned.
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 header for specified message
let result = pop3.getHeader(options, identifier);
// Return message object
return result;