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.
| Where | Purpose | Pick account | Own settings |
| Client › Admin › Mail Accounts | Account definitions, Default account | — | — |
| Studio › Assistant › Email Listening | Save incoming mail to a form | ✓ | ✓ (IMAP/POP3) |
| Studio › Assistant › Email Sending | Send mail from a form | ✓ | ✓ (SMTP) |
| Studio › Xpoda AI › AI Agents › agent › Mail | Agent reads its mailbox | ✓ | ✓ (IMAP/POP3) |
| Studio › Xpoda AI › Workflows › Mail trigger | Start a workflow from mail | ✓ | ✓ (IMAP/POP3) |
| Workflow, approval, notification mails | System sending | Always the Default account | |
2. Client › Admin › Mail Accounts
The accounts Xpoda sends and reads mail with. Account types:
| Type | Send | Read | Note |
| 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.


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.


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.

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.

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 |
|