auto_stories Knowledge Base chevron_right Guides chevron_right Article

Mail Settings: Sending and Listeningv5

In Xpoda v5, mail is both sent (workflow, approval, notification, assistant and AI agent replies) and listened to (a mailbox is read and a form record is created, or the mail is handed to an AI agent). This article covers every place where mail is configured and how they connect.

1. The rule: two ways, one engine

Mail can be configured in two ways; both are valid:

  • Define an account and pick it: define the account once in Client › Admin › Mail Accounts, then simply pick it from the Mail Account list in Studio's Assistant, AI agent and AI workflow Mail trigger. Passwords and Client Secrets are not stored on those screens.
  • Own settings: without an account, enter the server, port, user and password directly on the assistant or agent screen.

Either way, reading and sending run through one engine in Xpoda Service, so connection, security and after-read behaviour are the same everywhere.

WherePurposePick accountOwn settings
Client › Admin › Mail AccountsAccount definitions, Default account——
Studio › Assistant › Email ListeningSave incoming mail to a form✓✓ (IMAP/POP3)
Studio › Assistant › Email SendingSend mail from a form✓✓ (SMTP)
Studio › Xpoda AI › AI Agents › agent › MailAgent reads its mailbox✓✓ (IMAP/POP3)
Studio › Xpoda AI › Workflows › Mail triggerStart a workflow from mail✓✓ (IMAP/POP3)
Workflow, approval, notification mailsSystem sendingAlways the Default account

2. Client › Admin › Mail Accounts

The accounts Xpoda sends and reads mail with. Account types:

TypeSendReadNote
Microsoft 365 (Graph API) — recommended✓✓Azure app registration; Mail.Send, Mail.ReadWrite for reading
Microsoft 365 (SMTP + OAuth2)✓✓ (IMAP + OAuth2)Reading needs IMAP.AccessAsApp and an Exchange service principal
SMTP (own server / relay)✓✓The IMAP/POP3 server is entered on the screen that reads
Google Workspace✓✓ (imap.gmail.com)App password
Amazon SES (SMTP)✓—Sending only; not listed on reading screens

Default: the marked account is used for workflow, approval, notification and assistant mails. If the default account is deleted, another active account becomes default; if none is left, the old SMTP settings in General Settings are used.

Old location: the SMTP settings in General Settings › Mail Settings are moved to the Default account the first time the Mail Accounts screen is opened. From then on, manage mail settings in Mail Accounts.

Client › Admin › Mail Accounts list with the Default badge

New mail account: Microsoft 365 (Graph API) type with sample tenant and client IDs

3. Sign-in methods

Password: hosting providers, Yandex, Zoho or the company's own mail server. For reading, IMAP 993 (SSL) is recommended. With POP3 (995), read mails are deleted from the server.

App password: for accounts with two-step verification such as Google, iCloud and Yandex, enter an app password generated in the account's security settings instead of the normal password.

OAuth2 (Microsoft 365): Microsoft has disabled password sign-in for IMAP/SMTP in Microsoft 365 since 2022, which is why the error "The LOGIN command is disabled" appears. Define a Microsoft 365 account in Mail Accounts:

  • Create an app registration in Azure Portal › App registrations and enter its Tenant ID, Client ID and Client Secret in the account.
  • Application permissions: sending Mail.Send; reading (Graph type) Mail.ReadWrite; reading with the SMTP + OAuth2 type IMAP.AccessAsApp.
  • Admin consent (Grant admin consent) is required.

4. Studio › Assistant

Email Listening (save incoming mail to a form):

  • Mail Account: pick an account from Mail Accounts, or leave it empty and fill in Mail Host, Port, Use SSL, Username, Password. Ports 993 / 143 read over IMAP, other ports (995 / 110) over POP3.
  • Test connection: connects to the mailbox and shows the result before saving.
  • Each read mail becomes a record in the selected form. Mail Subject, Mail From, Mail To, Mail CC, Mail BCC, Mail Content and attachments are mapped to form fields (rich text field for content).

Email Sending (send mail from a form):

  • If a Mail Account is picked, mail is sent with that account.
  • Otherwise the SMTP fields on the screen are used; if they are empty too, the Default account is used.

Studio › Assistant › Email Listening: Mail Account and Test connection

Studio › Assistant › Email Sending: Mail Account

5. Studio › Xpoda AI › AI Agents › agent › Mail

With Read the agent's mailbox checked, the agent answers questions and tasks sent to its mailbox.

  • Pick a Mail account, or enter the IMAP/POP3 server, user (mailbox address) and password. Every (min) is the reading interval. Try it with Test connection.
  • After reading: mark as read, move to a folder or delete (with POP3 read mails are always deleted).
  • The agent decides itself whether the mail is a question, a task (form record) or a workflow.
  • The sender must be an Xpoda user allowed to use the agent on its Permissions tab. Mails from other senders are not processed.
  • Replies are sent in the agent's name, with the mailbox as reply-to.
  • This setting is stored as the Mail trigger of the agent's "mailbox" workflow; sender and subject filters can be added on the Workflows screen.

AI Agents › agent › Mail: Read the agent's mailbox, Mail account

6. Studio › Xpoda AI › Workflows › Mail trigger

  • The same fields as the agent screen: Mail account or own server, Test connection.
  • Start this workflow for every mail, or Let the agent decide (question, task or workflow).
  • Sender and subject filters: only matching mails are processed.
  • After reading: mark as read / move to folder / delete.

Workflows › Mail trigger: When a mail arrives, filters, After reading

7. Reading interval

Mailboxes are read by polling, not push: every N minutes, 2 minutes by default (1–1440).

8. How it connects

Client › Mail Accounts ──(pick)──► Studio Assistant (Listening / Sending)
        │                  ├──────► AI Agent › Mail  ──► agent's Mail trigger (Workflows)
        │                  └──────► Workflows › Mail trigger
        └── Default account ──► workflow / approval / notification / assistant sending
Own settings (server/user/password) ──► the same reader and sender (Xpoda Service)
Troubleshooting
  • "The LOGIN command is disabled": Microsoft 365 blocks password sign-in; define and pick a Microsoft 365 (Graph) account.
  • Permission error when reading with Graph: check Mail.ReadWrite (application) and admin consent on the Azure app.
  • The agent does not reply: is the sender an Xpoda user allowed on the agent's Permissions tab?
  • Mails disappear from the server: POP3 is in use; switch to IMAP 993.