Setting up the mailbox (IMAP/SMTP)
How emails reach the AI inbox and how replies, quotes and invoices go out – including server variables and multi-tenant operation.
Bu sayfada
How it works
Incoming emails are fetched via IMAP once a minute – unread messages only. An email is only marked as read after successful processing. Then the mail and document agents take over. Without IMAP, emails can still be imported via the API (POST /api/mail/ingest, e.g. for add-ins or migrations).
Receiving (IMAP) – server variables
| Variable | Meaning |
|---|---|
MAIL_INGEST_ENABLED=true | Enables IMAP retrieval (also requires IMAP_HOST, otherwise mail_ingest_disabled) |
IMAP_HOST, IMAP_PORT (993), IMAP_USER, IMAP_PASSWORD | Mailbox access |
IMAP_SECURE | true/false; default: TLS on port 993 |
IMAP_MAILBOX (INBOX), IMAP_MAX_PER_POLL (50) | Folder and number of emails per poll |
IMAP_TLS_REJECT_UNAUTHORIZED=false | Only for self-signed certificates |
MAIL_INGEST_TENANT | Tenant that receives emails when no recipient address matches (fallback: oldest tenant) |
Sending (SMTP)
SMTP_HOST, SMTP_PORT (587), SMTP_USER, SMTP_PASSWORD, SMTP_FROM, SMTP_SECURE and SMTP_TLS_REJECT_UNAUTHORIZED control sending of replies, quotes, transport orders, invoices and delay notifications.
Not: Without SMTP_HOST, messages are only stored and carry a “not sent yet” badge. Check sending via the IMAP/SMTP mailbox integration → test connection.
Multiple tenants and own credentials
- Set
settings.mailboxper tenant to its recipient address (e.g.dispo@spedition.at). An email goes to the tenant whose address is among the recipients. - Alternatively store tenant-specific values in the IMAP/SMTP mailbox integration (IMAP/SMTP host, port, user, password, sender address); empty fields fall back to the matching server variables.
- Sender recognition uses partners’ email addresses and email domains as well as contact emails. Attachments under 8 MB are passed to the AI as PDF/image; PDFs are always text-extracted.
İlgili makaleler
- AI inboxRead and classify emails, link them to orders, create orders from emails and reply with an AI draft.
- IntegrationsConnect, test and monitor freight exchange, telematics, accounting, email, routing, geocoding, sanctions list and e-invoicing.
- Troubleshooting for administratorsTypical symptoms – from mock mode and missing emails to webhook and sign-in problems – with cause and fix.