Skip to content
Docs

How to connect a mailbox

This guide shows you how to connect a mailbox so an Email trigger can start flows from incoming mail, and so a Channel / Email node can reply from the same address.

The quickest mailbox is a Publicus inbox: an address on publicus.email that Publicus hosts, which sends and receives with nothing to connect. To use your own address instead, pick your provider by name and Publicus works out how to reach it: an OAuth sign-in where the provider offers one, and a pre-filled IMAP setup where it does not.

  • Access to the App panel for your workspace.
  • The mail account you want to connect, with permission to change its settings.
  1. In the App panel, open Mailboxes and click New mailbox.
  2. Give it a clear Name, for example Support inbox.
  3. Choose what kind of mailbox it is:
Option Use it when
Publicus inbox You want an address that works right away, or your provider is not listed. You can forward mail from your own mailbox to it.
Choose your provider You want flows to read and send as your own address, and your provider is in the list.
Manual IMAP You run your own mail server, or you need to override the settings yourself.
Your own SMTP server You only want to send, through a server you already use. See Mailboxes; nothing arrives on it, so it cannot start a flow.
Step 1 of Create mailbox: a Name, the four kinds of mailbox (Publicus inbox, Choose your provider, Manual IMAP, Your own SMTP server) and a Your provider picker
Step 1 of Create mailbox: a Name, the four kinds of mailbox (Publicus inbox, Choose your provider, Manual IMAP, Your own SMTP server) and a Your provider picker

The rest of the wizard changes to match your choice.

Publicus gives the inbox its own address and hosts it for you, so there are no credentials to manage.

  1. Choose Publicus inbox.

  2. Check the Address. It starts as the mailbox name, so Support inbox gives support-inbox (or support-inbox-2 when another inbox already has that name), and you can type another. Publicus adds a part fixed for your workspace, so the address reads like support-inbox-k3xq@publicus.email. It cannot be changed later.

  3. On the last step, choose what the inbox takes. Replies to mail it sent (on) fits an inbox that sends notifications and handles the answers. New mail takes everything else: From anyone fits an address you publish or forward mail to, and Only from these domains keeps it to the senders you list.

    Step 3 of Create mailbox for a Publicus inbox: Sending, with Send mail from this address, Sender name, Always BCC and Signature, and Receiving, with Replies to mail it sent and New mail, then Back and Create
    Step 3 of Create mailbox for a Publicus inbox: Sending, with Send mail from this address, Sender name, Always BCC and Signature, and Receiving, with Replies to mail it sent and New mail, then Back and Create
  4. Finish creating the mailbox. If your workspace had no mailbox to send from yet, this inbox becomes its Send mail from mailbox.

You forward mail to the inbox’s own address. Switch New mail on first, because forwarded mail is new mail:

  1. Copy the inbox’s address from the mailbox page.

  2. Add it as a forwarding address in the mail account you want to receive from. The mailbox page shows the exact menu path for common providers while New mail is on.

  3. Most providers email a confirmation code before they will forward to a new address. Because Publicus receives that email, the code appears on the mailbox page as soon as it arrives. Paste it back into your provider to finish.

    A Publicus inbox's Receiving settings: Replies to mail it sent on, New mail from anyone, How to forward mail here, and the provider confirmation code to paste back
    A Publicus inbox's Receiving settings: Replies to mail it sent on, New mail from anyone, How to forward mail here, and the provider confirmation code to paste back

Anyone who learns the address can write to it. To keep flows to mail from people you know, set New mail to Only from these domains and list the domains of the original senders: a forwarding rule keeps them as the sender.

Pick your provider from the list. Publicus tells you which route it will use, and fills in whatever it can.

Step 1 of Create mailbox with Choose your provider set to Google, the note Connect with OAuth, no password to store, and the same connection can send replies, and a Use an app password (IMAP) instead switch turned off
Step 1 of Create mailbox with Choose your provider set to Google, the note Connect with OAuth, no password to store, and the same connection can send replies, and a Use an app password (IMAP) instead switch turned off

Google and Microsoft accounts connect by signing in, with no password stored anywhere. Select an existing connection for that provider, or click + New connection to create one.

After selecting a connection, check the message underneath it:

  • “This connection can read and send mail” means you are ready. Continue to the activation step.

    Step 2 of Create mailbox with a Google connection picked and the note This connection can read and send mail
    Step 2 of Create mailbox with a Google connection picked and the note This connection can read and send mail
  • A warning that the connection cannot read mail yet means the account is connected but has not granted mail access. Click Grant mail access, approve the request in the window that opens, then reload the mailbox page. See requesting more access for what that step does.

    A Google connection that cannot read mail yet, with a Grant mail access link and a reminder to reload the page
    A Google connection that cannot read mail yet, with a Grant mail access link and a reminder to reload the page

Yahoo, iCloud, and Fastmail do not offer an OAuth route for mail, so Publicus polls them over IMAP and fills in the server settings for you. These providers reject your normal account password, so you need to generate an app password:

Step 1 of Create mailbox with Yahoo Mail as the provider and the note that it is polled over IMAP with the server settings filled in and needs an app password, with a generate one here link
Step 1 of Create mailbox with Yahoo Mail as the provider and the note that it is polled over IMAP with the server settings filled in and needs an app password, with a generate one here link
  1. Follow the generate one here link shown in the wizard, which opens the right page at your provider.
  2. Create the app password and copy it. Providers show it only once.
  3. Back in Publicus, select a secret for the Password secret field, or click + New secret to store the value inline. The password lives in the encrypted vault and is never saved on the mailbox itself.
  4. Enter the account’s Username, usually the full email address.
Step 1 of Create mailbox with Google as the provider and Use an app password (IMAP) instead switched on, so the note now says it is polled over IMAP and needs an app password
Step 1 of Create mailbox with Google as the provider and Use an app password (IMAP) instead switched on, so the note now says it is polled over IMAP and needs an app password

Use this for a mail server Publicus does not know about, or when you need to override the defaults.

Field Description
Host The IMAP server hostname, for example imap.example.com.
Port The IMAP port. Defaults to 993.
Encryption SSL, TLS, STARTTLS, or None.
Username The account’s IMAP username, usually the full email address.
Password secret A secret holding the account password.
Folder The folder to watch when Folders to poll is empty. Defaults to INBOX.
Step 2 of Create mailbox for IMAP: host, port, encryption, username, password secret and folder, then the SMTP host, port and security for replies
Step 2 of Create mailbox for IMAP: host, port, encryption, username, password secret and folder, then the SMTP host, port and security for replies

Microsoft 365 has retired password sign-in for IMAP, so it will not work here. Connect it with Choose your provider instead.

A mailbox that receives mail can also answer it, so replies thread into the recipient’s existing conversation.

  • A Publicus inbox replies from its own address, within its sending limits. A message you forwarded to it is answered from the inbox’s address too, not from the account it was forwarded from.

  • OAuth mailboxes reply through the same connection, once it has permission to send. If the mailbox page says the connection can read but not send mail, use the Grant mail access link to add sending.

    A mailbox's Google connection field with the note that this connection can read mail but not send it, so flows cannot reply from this mailbox, and a Grant mail access link
    A mailbox's Google connection field with the note that this connection can read mail but not send it, so flows cannot reply from this mailbox, and a Grant mail access link
  • IMAP mailboxes reply over SMTP. When you picked a provider from the list, the outgoing server is already filled in. On the manual path, set SMTP host (plus port and security) yourself. Replies reuse the same password secret, so there is nothing else to enter.

Leave the SMTP host blank for a receive-only mailbox. Flows can still trigger on incoming mail, but a reply to it goes out from your workspace’s Send mail from mailbox instead, set on the Mailboxes page.

By default a mailbox reads its inbox. Use Folders to poll on the mailbox’s final step to read other folders as well, for example Junk, so a reply that lands in spam still reaches your flow, or the sent folder, so a flow also sees the mail you send.

  1. Click Folders to poll. The list shows the folders the account actually has, under the names you see in your mail client. A Dutch Outlook lists its sent folder as Verzonden items.

    The Folders to poll list open with a search box and the account's folders: Archive, Drafts, INBOX, Junk and Sent
    The Folders to poll list open with a search box and the account's folders: Archive, Drafts, INBOX, Junk and Sent
  2. Select every folder you want to read. Leave the field empty to read only the inbox.

  3. If a folder is not in the list, type its name and select it. For a folder inside another, type the path, for example Inbox/Klanten. The list stays empty until the mailbox can sign in (a connection that may read mail, or an IMAP password).

Each folder keeps its own place, so adding a folder reads the mail that reaches it from then on, including anything that arrives before the next check. Removing a folder and adding it back starts it afresh. A folder you picked from the list keeps working when you rename it in Outlook.

The mailbox’s Messages tab shows which folder each message came from, and whether it was received, sent by you, or sent by a flow.

A Gmail mailbox's Messages with a Folder column: a reply received in SPAM, the owner's own answer marked Sent from SENT, and a question received in INBOX
A Gmail mailbox's Messages with a Folder column: a reply received in SPAM, the owner's own answer marked Sent from SENT, and a question received in INBOX

Mail from the sent folder only starts flows whose Email trigger is set to take sent mail. A flow that answers incoming mail keeps working as before when you add the sent folder. Replies a flow sends from this mailbox are never read back as new mail.

  1. On the final step, switch Active on. A mailbox that is off does not start any flows. A Publicus inbox has no Active switch: its Replies to mail it sent and New mail settings say what starts a flow.
  2. For IMAP, choose what happens after each poll: leave messages unread (the default) or mark them as seen. Publicus never uses the read flag to avoid duplicates, so leaving mail untouched is safe.
  3. Click Create.
  4. Add an Email trigger to a flow, point its mailboxId at the new mailbox, then click the trigger’s badge on the canvas and switch Active on.
  5. Send a test message to the address. Within a minute or two a run of the flow appears in Runs, and the message itself is listed under the mailbox’s Messages tab.

Only mail that arrives after you create the mailbox starts a flow. Connecting an existing account does not replay its history, so an inbox with years of mail will not fire thousands of runs.

The mailbox never receives anything. Its status on the Mailboxes list says why first: Off, Failing, Needs reconnecting or Not checked yet, with a line under it. Then check that the trigger is active too. The mailbox and the trigger are separate switches, and mail is ignored unless both are on. For a Publicus inbox, check Replies to mail it sent and New mail instead.

Forwarded mail never arrives. Confirm the forwarding rule is confirmed at your provider, not just created. Most providers hold forwarding inactive until the code is verified.

A Publicus inbox starts nothing for new or forwarded mail. With New mail off, only answers to mail the inbox sent start flows. Set it to From anyone, or to Only from these domains and check that the sender’s domain is listed. The mailbox’s Messages tab shows the message and why it was refused.

Polling fails with an authorization error. The connection has lost access or was never granted mail access. Open the mailbox, follow Grant mail access, and approve the request again.

IMAP sign-in is rejected. Most consumer providers require an app password rather than your account password, and some require two-step verification before they will issue one. Regenerate the app password and update the secret.

A folder stopped being read. The mailbox reads Failing on the Mailboxes list, and its page shows why the last poll failed, for example a folder that was renamed or deleted in your mail client. Pick the folder again under Folders to poll. The other folders keep being read in the meantime.

A warning on the mailbox page that the last poll failed 2 hours ago because the folder Support/Escalations does not exist on the IMAP server
A warning on the mailbox page that the last poll failed 2 hours ago because the folder Support/Escalations does not exist on the IMAP server

Replies go out from another address, or fail, but receiving works. The mailbox has no outgoing server, or the connection can read mail but has not been granted permission to send. Both cases are reported on the mailbox page. Until it can send, a reply goes out from the workspace’s Send mail from mailbox, and fails when there is none or when the Email node names this mailbox.