fetchmail.server: fields, relations and API
The fetchmail.server model ("Incoming Mail Server") is a persistent model declared by the Discuss module, then extended by 2 other modules. It exposes 34 fields, 20 of them declared directly on the model; 1 field from other models points to it. Below you will find every field with its technical name, type, label and relations, followed by an Odoo 19 JSON-2 API call.
Model identity
- Technical name
fetchmail.server- Label
- Incoming Mail Server
- Type
- Persistent (models.Model)
- SQL table
fetchmail_server- Origin module
- Discuss (
mail) - Extended by
- google_gmail, microsoft_outlook
- Default order (_order)
priority- Inherits from (mixins)
- google.gmail.mixinmicrosoft.outlook.mixin
Model fields
20 own fields, 8 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.
34 of 34 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| active | Active | boolean | |
| attach | Keep Attachments Whether attachments should be downloaded. If not enabled, incoming emails will be stripped of any attachments before being processed | boolean | |
| configuration | Configuration | text | read-only |
| date | Last Fetch Date | datetime | read-only |
| error_date | Last Error Date Date of last failure, reset on success. | datetime | read-only |
| error_message | Last Error Message | text | read-only |
| is_ssl | SSL/TLS Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP3S=995) | boolean | |
| message_ids | Messages | one2many | read-only inverse: |
| name | Name | char | required |
| object_id | Create a New Record Process each incoming mail as part of a conversation corresponding to this document type. This will create new documents for new conversations, or attach follow-up emails to the existing conversations (documents). | many2one→ ir.model | |
| original | Keep Original Whether a full original copy of each email should be kept for reference and attached to each processed message. This will usually double the size of your message database. | boolean | |
| password | Password | char | |
| port | Port | integer | |
| priority | Server Priority Defines the order of processing, lower values mean higher priority | integer | |
| script | Script | char | read-only |
| server | Server Name Hostname or IP of the mail server | char | |
| server_type | Server Type | selection | required Values: |
| server_type_info | Server Type Info | text | computed |
| state | Status | selection | read-only Values: |
| user | Username | char | |
| google_gmail_access_token | Access Token | char | inherited from google.gmail.mixin |
| google_gmail_access_token_expiration | Access Token Expiration Timestamp | integer | inherited from google.gmail.mixin |
| google_gmail_refresh_token | Refresh Token | char | inherited from google.gmail.mixin |
| google_gmail_uri | URI The URL to generate the authorization code from Google | char | computed inherited from google.gmail.mixin |
| microsoft_outlook_access_token | Outlook Access Token | char | inherited from microsoft.outlook.mixin |
| microsoft_outlook_access_token_expiration | Outlook Access Token Expiration Timestamp | integer | inherited from microsoft.outlook.mixin |
| microsoft_outlook_refresh_token | Outlook Refresh Token | char | inherited from microsoft.outlook.mixin |
| microsoft_outlook_uri | Authentication URI The URL to generate the authorization code from Outlook | char | computed inherited from microsoft.outlook.mixin |
| create_date | Created on | datetime | read-onlyautomatic |
| create_uid | Created by | many2one | read-onlyautomatic |
| display_name | Display Name | char | read-onlycomputedautomatic |
| id | ID | integer | read-onlyautomatic |
| write_date | Last Updated on | datetime | read-onlyautomatic |
| write_uid | Last Updated by | many2one | read-onlyautomatic |
Reading this model through the API
Odoo 19 JSON-2 API call reading the first five records with real fields of the model. Replace the instance, database and API key with your own.
curl -X POST "https://your-instance.odoo.com/json/2/fetchmail.server/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["name","server_type","state","object_id","active"],"limit":5}'import requests
BASE_URL = "https://your-instance.odoo.com/json/2"
headers = {"Authorization": f"bearer {API_KEY}", "X-Odoo-Database": "your-db"}
res = requests.post(
f"{BASE_URL}/fetchmail.server/search_read",
headers=headers,
json={"domain": [], "fields": ["name","server_type","state","object_id","active"], "limit": 5},
)
res.raise_for_status()
print(res.json())- External API access requires Odoo's Custom plan.
- XML-RPC and JSON-RPC will be removed in Odoo 22 (fall 2028): use JSON-2.
- The access rights and record rules of the key's user apply.
Cite this tool
Writing a tutorial, internal documentation or a forum answer? Copy this link to send your readers to the up-to-date reference.
<a href="https://aidoo.ai/en/outils/explorateur-modeles-odoo/fetchmail-server">fetchmail.server (Odoo 19.0)</a>Sources
Data verified on September 23, 2026 · Odoo 19.0 Community
Have an Odoo project, or want to put your ERP to work with AI? Let's talk
Implementation, custom module development, connecting Claude or ChatGPT to your data: tell us about your context and we will reply within 24 business hours.