imap.getCount(session) Last updated: 25. Jan 2024
API only function
Gets the current count of messages in the inbox.
Parameters
Name | Type | Description |
---|---|---|
session | object | Imap session object from imap.connect(). |
Returns
Number of emails in inbox.
Example
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.let i = imap.connect(config);
let count = imap.getCount(i);
write(count);