Mandala
Tools

POP3

Download emails and attachments from a POP3 mailbox as a standalone operation.

POP3 (Post Office Protocol version 3) is an older, simpler protocol for fetching emails from a remote mailbox. Unlike IMAP, it was designed for simple offline mail readers where emails are downloaded to a single local device and immediately deleted from the mail server.

In Mandala, the POP3 block operates strictly as a standalone tool to download batches of emails or retrieve historical documents.


[!CAUTION]

POP3 Chaining Restriction

Unlike IMAP, POP3 does not support fetching individual emails by a persistent message UID. POP3 servers number messages sequentially starting from 1 up to N during each connection session, and these numbers reset every time a connection is established.

Therefore:

  • POP3 cannot be used to fetch attachments for a specific email that triggered a workflow.
  • If you need a workflow that triggers on incoming emails and downloads their attachments, you MUST use IMAP and the IMAP: Get Attachments block instead.

Configuration Inputs

ParameterTypeRequiredDefaultDescription
pop3HoststringYes-POP3 server hostname (e.g. pop.gmail.com)
pop3PortstringYes995POP3 server port
pop3SecuredropdownYesSSLSecurity mode: SSL, TLS, or None
pop3UsernamestringYes-Your POP3 username
pop3PasswordstringYes-Your password or App Password
maxMessagesnumberNo10Maximum number of emails to retrieve
includeAttachmentsswitchNofalseWhen enabled, parses and downloads files attached to emails
deleteAfterDownloadswitchNofalseDeletes emails from the server after successfully downloading them

Outputs

  • emails: Array of downloaded emails:
    [
      {
        "subject": "Weekly Report",
        "from": "manager@company.com",
        "to": "staff@company.com",
        "date": "2026-06-16T12:00:00.000Z",
        "bodyText": "Hello, here is the report...",
        "bodyHtml": "<p>Hello, here is the report...</p>",
        "attachments": []
      }
    ]
  • count: Number of emails successfully downloaded.

When to Use POP3 vs IMAP

FeatureIMAPPOP3
Workflow TriggerYes (polls every minute, starts run for each email)No (standalone only)
Selective Attachment FetchYes (fetch by persistent UID)No (fetches whole batch)
Server SynchronizationKeeps emails on server, updates read/unread statusDownloads locally; deletes from server if configured
Gmail Port993995
POP3