MailDesk docs
Setup and administration

Connect another email provider (IMAP/SMTP)

7 min read Odoo 18.0

Use this page to connect any mailbox that supports standard IMAP (to receive mail) and SMTP (to send mail) with a username and password. This includes your own mail server, a hosting provider, FastMail and Mailcow.

Who this is for: MailDesk administrators (the Mailbox Admin role).

You need: MailDesk Basic installed, and the host, port and login for the mailbox (see Before you begin).

Available in: Basic. The servers are standard Odoo mail server records, so this works the same with or without Pro.

Gmail or Microsoft 365? Use sign-in instead

For Gmail / Google Workspace and Microsoft 365 / Outlook, the sign-in (OAuth) path stores no password and you can revoke it at any time. Use IMAP/SMTP for those providers only when sign-in is not possible. See Connect Gmail / Google Workspace. The IMAP path for Gmail needs an App Password, covered at the bottom of this page.


Before you begin

  • MailDesk Basic installed (see Install MailDesk). The steps were written against Odoo 18; labels can differ slightly on other versions.
  • IMAP turned on at your mail provider (it usually is by default).
  • Two hosts and two ports: the incoming (IMAP) host and port, and the outgoing (SMTP) host and port.
  • The mailbox login and password — or an app password if your provider requires one.
  • A quick check that your Odoo server is allowed to reach those hosts and ports (most are, but a tight firewall can block them).

Who can do this

Configuring mail servers and mailbox accounts is a Mailbox Admin task in MailDesk. The server menus appear only for administrators, under MailDesk ▸ Configuration ▸ Mailboxes.

The MailDesk app tile in the Odoo apps menu


How the three pieces fit together

A working mailbox is made of three records:

flowchart LR
    A[Mailbox Account] -->|Incoming Mail Server| B[Incoming server<br/>IMAP — receives mail]
    A -->|Outgoing SMTP Server| C[Outgoing server<br/>SMTP — sends mail]
  • The incoming server holds the IMAP host, port, encryption, username and password. Its Server Type tells MailDesk how to sign in — plain IMAP password, Gmail sign-in, or Outlook sign-in.
  • The outgoing server holds the SMTP host, port, encryption, username and password.
  • The mailbox account points at both, and adds the friendly name, who can use it, and the signature. See Add or manage a mailbox for that record in detail.

You build them in that order below: incoming first, outgoing second, then link them on the account.


Common provider settings

Not sure what to type? These are sensible starting points. Always confirm against your provider's own help pages, because hosts and ports do vary.

Provider Incoming (IMAP) Outgoing (SMTP) Notes
Your own / Mailcow / generic host host from your provider, port 993 (SSL/TLS) or 143 (STARTTLS) host from your provider, port 465 (SSL/TLS) or 587 (STARTTLS) Check your mailserver's documentation
Gmail (app password) imap.gmail.com, port 993 smtp.gmail.com, port 465 or 587 Needs 2-Step Verification + an App Password; the sign-in path is recommended instead
Outlook / Microsoft 365 (app password) outlook.office365.com, port 993 smtp.office365.com, port 587 The sign-in path is strongly recommended instead
FastMail imap.fastmail.com, port 993 smtp.fastmail.com, port 465 —
ProtonMail Bridge 127.0.0.1, port 1143 127.0.0.1, port 1025 Requires the ProtonMail Bridge app running locally

The port follows your encryption choice

When you pick IMAP Server as the Server Type, Odoo fills the port in for you based on the SSL/TLS switch: 993 with SSL/TLS on, 143 with it off. If your provider uses a different port, just type it over the suggestion.


Step 1 — Create the incoming (IMAP) server

This is the record that receives your mail.

  1. Open the MailDesk app.
  2. Go to Configuration ▸ Mailboxes ▸ Incoming Mail Servers, then click New.
  3. Fill in the form (it's titled Incoming Mail Server): - Name — a label so you'll recognise it later, for example Support IMAP. - Server Type — choose IMAP Server for a standard mailbox. (The same list also offers Gmail OAuth Authentication and Outlook OAuth Authentication, which belong to the sign-in path, not this one.) - Under Server Information: enter the Server Name (your IMAP host, e.g. imap.example.com), the Port, and turn SSL/TLS on for an encrypted connection. - Under Login Information: enter the Username (usually your full email address) and the Password (the mailbox password, or an app password if your provider needs one).
  4. Click Test & Confirm in the form header to check the connection and credentials in one go.

What you should see: the server status flips from Not Confirmed to Confirmed — that's MailDesk telling you the IMAP login succeeded.

The Incoming Mail Server form with Server Type set to IMAP Server, the Server Name, Port and SSL/TLS fields, and the Username and Password fields


Step 2 — Create the outgoing (SMTP) server

This is the record that sends your mail.

  1. Still in MailDesk, go to Configuration ▸ Mailboxes ▸ Outgoing Mail Servers, then click New.
  2. Fill in the form (titled Outgoing Mail Servers): - Name — a label for this server. - Connection Encryption — choose SSL/TLS or TLS (STARTTLS) to match your provider. - SMTP Server — the SMTP host, for example smtp.example.com. - SMTP Port — for example 465 for SSL/TLS, or 587 for STARTTLS. - Username and Password — the SMTP login. This is often the very same credentials you used for IMAP.
  3. Click Test Connection to confirm the server accepts your login.

What you should see: a green success notification confirming the SMTP server is reachable and the credentials work.

The Outgoing Mail Server form with the Connection Encryption choice, the SMTP Server and SMTP Port fields, and the Username and Password fields


Step 3 — Attach the servers to a mailbox account

Now bring the two halves together so MailDesk knows they belong to one mailbox.

  1. Open or create the mailbox account (see Add or manage a mailbox for the full walkthrough).
  2. Set Incoming Mail Server to the IMAP server you built in Step 1, and Outgoing SMTP Server to the SMTP server from Step 2.
  3. Save the account, then use the buttons in the form header: Test Incoming Server, Test Outgoing Server, and finally Fetch folders.

What you should see: both tests report Connection Test Successful!, your folders appear on the Folders tab, and MailDesk starts filling the mailbox with your messages.

The mailbox account form with the Incoming Mail Server and Outgoing SMTP Server fields and the test buttons in the header

Server rule: one incoming server per mailbox

An incoming server belongs to one mailbox. One outgoing server may serve several mailboxes when its FROM Filtering is empty or lists every mailbox address; all of them must belong to the same company. If you share an outgoing server, open it and check FROM Filtering before you save the mailbox account. MailDesk refuses to save an account whose address the outgoing server may not send as.


Gmail over IMAP (App Password)

Only reach for this when the Gmail sign-in path isn't an option for you.

  1. In your Google Account, turn on 2-Step Verification.
  2. Create a Google App Password for Mail and copy the 16-character code.
  3. Build the incoming server with Server Name imap.gmail.com, Port 993, SSL/TLS on, Username = your full Gmail address, Password = the app password.
  4. Build the outgoing server with SMTP Server smtp.gmail.com, SMTP Port 465 or 587, the matching encryption, and the same username and app password.

Some Google Workspace accounts block app passwords

A Workspace administrator may switch app passwords off, or restrict which clients may connect by IMAP. If app passwords aren't available to you, use Connect Gmail / Google Workspace instead.


How the mailbox stays in sync

After you attach a confirmed server, MailDesk fetches new mail with scheduled background jobs. Do not disable these scheduled actions. New mail appears within the normal polling window, and an open MailDesk view refreshes when messages arrive. For timing, see How quickly email synchronizes.

Sent mail with IMAP

By default, MailDesk drops a copy of each message you send into the mailbox's Sent folder — the Append Sent to IMAP option on the mailbox account. If your mailserver already saves sent mail itself, switch this option off to avoid seeing two copies.


If it does not work

Most setup problems come from a wrong host, port or encryption choice. See also Fix common MailDesk problems.

Symptom Likely cause What to do
Can't connect to the incoming server Wrong host or port, encryption mismatch, or a firewall Re-check Server Name, Port, and SSL/TLS; confirm the Odoo server can reach the host
Login fails on Test & Confirm Wrong username/password, or the provider needs an app password Verify the credentials in webmail; create an app password if 2-step verification is on
Test Connection fails on the outgoing server Wrong SMTP host/port or encryption Match SMTP Server, SMTP Port, and Connection Encryption to the provider; try 465 (SSL/TLS) or 587 (STARTTLS)
Sent mail doesn't show in Sent The Sent folder isn't synced, or has a non-standard name Click Fetch folders and make sure the Sent folder is selected; its name varies (Sent, Sent Items, Sent Messages)
The same email appears more than once The message lives in several server folders This is normal IMAP behaviour — one entry per folder
Initial sync seems slow A large mailbox The newest messages load first; older mail fills in afterwards in the background

Next step

Attach the servers to a mailbox: Add or manage a mailbox. To choose which folders sync, see Choose folders and sync settings.