POP3 Read
POP3 Read
Section titled “POP3 Read”Type: pop3-read · Package: SMTP / IMAP Email Activities v1.0.5 · Output: List<ZoanMail>
Reads emails from a POP3 server and returns a list of messages (ZoanMail). POP3 is an old, limited protocol: it does not support folders, filters or read state.
How it works
Section titled “How it works”Connects to the server (port 995 with ssl by default), signs in, counts the messages in the mailbox and downloads the limit most recent (default 10). Reading does not delete emails from the server or change anything: to remove them use POP3 Delete.
Since POP3 keeps no state, each read returns the same emails while they remain in the mailbox. To avoid processing twice, delete what you processed or keep track elsewhere of what you already took (for example, subject and date).
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
host | string | — | POP3 server (e.g. pop.gmail.com). |
username | string | — | Username. |
password | string | — | Password or App Password, as text: use credential("name")["password"] (or credential("name")["value"] if the credential holds a single value). |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
port | int | 995 | POP3 port. With TLS: 995; unencrypted or with starttls: 110. |
limit | int | 10 | Maximum number of emails to return (the most recent). |
includeAttachments | bool | false | Downloads attachment content into .Attachments (name, MIME type and bytes). |
security | string | "ssl" | Encryption: auto, none, ssl or starttls. See Encryption and ports. |
acceptInvalidCerts | bool | false | Accepts untrusted (self-signed) TLS certificates, useful on test servers. Do not enable it against production servers. |
Output
Section titled “Output”Returns a List<ZoanMail> with up to limit emails, from oldest to newest within that group. Each email has:
| Property | Content |
|---|---|
.Id | Message index in the mailbox, from 0 (numeric text). Use it as mailId in POP3 Delete. |
.Subject, .From, .To, .Cc | Subject, sender address and recipient addresses. |
.Body / .IsHtml | Plain text of the email; if it only has HTML, the HTML with .IsHtml = true. |
.SentAt | Date from the Date header (sent date). |
.IsRead | Always false (POP3 has no read state). |
.Attachments | Attachments with content if includeAttachments = true; otherwise empty. |
If the mailbox is empty, it returns an empty list.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'host' is required. (and the same for username, password) | The parameter is missing or the expression returned null. |
| Server authentication error | Wrong username or password, App Password required, or POP3 disabled for the account. If you passed credential("name") without ["password"], the text sent is not the password. |
| Connection or TLS error | Wrong host or port, security does not match the port, or the server certificate is not trusted (on a test server, acceptInvalidCerts = true). |
Example
Section titled “Example”POP3 Read host = "pop.gmail.com" username = credential("mail-bot")["user"] password = credential("mail-bot")["password"] limit = 20 → output: emailsFor Each items = emails itemVariable = email └─ activities: Log message = email.SentAt.ToString("yyyy-MM-dd HH:mm") + " · " + email.From + " — " + email.SubjectRelated activities
Section titled “Related activities”- IMAP Read — recommended alternative, with folders and filters.
- POP3 Delete — delete an email you read.