Skip to content

Email

Email connects a task to a mailbox. It ships with Requence as an ordinary external service: it is added once, with its variants, through the normal service UI, and then behaves like any service you wrote yourself.

Variant Mode What it does
receiver Continuous Watches one IMAP mailbox and emits a message for every mail that arrives
sender Linear Sends one mail over SMTP per message and returns the server’s receipt

The receiver’s output and the sender’s input have the same mail shape, so a receiver node can feed a sender node directly.

The node holds one IMAP connection open for the life of the task and emits { mail } for every new mail in the watched mailbox: the subject, the text and HTML bodies, the addresses, the attachments as files, and the mailbox’s uid for the mail. It is a continuous node, so it stays RUNNING until the task stops.

Each mail also carries what a graph can do back to it — delete, move, markSeen/unmarkSeen and markFlagged/unmarkFlagged. These are durable callbacks: a graph can call them long after the mail arrived, also after the service was restarted.

Configuration
host, port, secure The IMAP server. Port 993 with secure on, or 143 with it off.
username, password The account. Leave both empty for an anonymous login.
mailbox The folder to watch. Empty means INBOX.
startAfterUid Emit every mail after this uid first, oldest first, then continue live. Unset: only mail that arrives from now on. 0: the whole mailbox.

A receiver never goes quiet without saying so. A RUNNING receiver node either receives mail or tells you why it does not:

  • A short drop — the server restarted, the network failed for a moment, the server closed an idle connection. The receiver reconnects by itself, up to six attempts over about 48 seconds, and then fetches every mail that arrived meanwhile. Nothing is lost and nothing is emitted twice. The node log shows the drop and the reconnect.
  • The server stays unreachable after those attempts, or cannot be reached at the start. The receiver ends the attempt and starts again after 30 seconds, and it keeps doing so until the server is back. Each restart is reported in the node log with the cause, for example IMAP server imap.example.com:993 is unreachable (ECONNREFUSED). The node stays RUNNING during this time.
  • A fault that waiting cannot fix — a wrong username or password, or a mailbox that does not exist or the account may not read. The node fails, once, with a sentence that names the cause, for example IMAP authentication failed for ada on imap.example.com:993 — check the username and password. The password is never part of it. As with every node failure, the error branch takes it if the node has one; otherwise the task fails, and an automation on it is FAILED with this sentence as its reason.

A host name that cannot be resolved counts as unreachable, not as a configuration fault: a short DNS failure looks the same, and a failed automation stays failed. A mistyped host therefore retries, and every retry says why in the node log.

The node takes { mail } — to, subject, and text and/or html, with optional cc, bcc, replyTo and attachments — and sends it through the configured SMTP server (host, port, secure, username, password, from). Its output is the server’s receipt: the addresses it accepted and rejected, and the message id. A receipt means the server took the mail, not that it was delivered; a later failure arrives as a bounce mail.