Each one installs AhaSend (
mail_ahasend), which holds the account settings and sets up sending in one click. The modules are licensed under AGPL-3.0 and work with Odoo 18.0 and 19.0. The source code is on GitHub: AhaSend/odoo-ahasend. Delivery tracking builds on the mail_tracking module of the Odoo Community Association (OCA).
Prerequisites
- Odoo 18.0 or 19.0, with administrator access and a way to add modules to the addons path
- A verified sending domain in AhaSend
- For delivery tracking and inbound email: an address where AhaSend can reach your Odoo over
https://, such ashttps://odoo.example.com - For Email Marketing: a second verified domain that only sends your mailings, such as
news.example.com
Install the modules
- Download the branch that matches your Odoo version (
19.0or18.0) of AhaSend/odoo-ahasend. Until the release, the repository is open to testers only: see the note at the top of this page. For delivery tracking, also download the same branch of OCA/mail, which holdsmail_tracking. - Add the folders to the
addons_pathof your Odoo server and restart Odoo. - In Odoo, go to Apps, click Update Apps List and search for AhaSend. Install the features you want: Mail tracking for AhaSend, Inbound email for AhaSend, Email Marketing through AhaSend, AhaSend sandbox for test copies and AhaSend test inbox.
Create an API key
The modules use the Management API to set themselves up in your account. In Account Settings → API Keys, create an API key with the scopes of the features you installed:
The route and SMTP credential scopes also work for one domain, such as
routes:write:{domain} for your inbound domain. Copy the key’s secret right away, together with your account ID. See API authentication.
Connect your account
1
Open the AhaSend settings
In Odoo, go to Settings → General Settings → Emails and turn on Use AhaSend.
2
Fill in your account
- Account ID: your AhaSend account ID.
- Secret key: the API key’s secret.
- Sending domain (optional): limits the modules to one sending domain. The tracking webhook and the sandbox credential then only cover that domain, plus the marketing domain when you connect Email Marketing. The suppression buttons only cover the sending domain. Leave it empty for all domains of your account.
- Odoo URL: the public
https://address of your Odoo, where AhaSend sends tracking events and inbound email. Odoo uses its own base URL and only shows this field while that is not anhttps://address. Then fill in the address where AhaSend reaches your Odoo.
Send Odoo’s email through AhaSend
Odoo sends through AhaSend SMTP. Tracking and test copies both start from there.- In the AhaSend settings, fill in Sending domain with your verified sending domain.
- In the AhaSend sending box, click Send through AhaSend.
- creates an SMTP credential named Odoo (your database) in AhaSend that can only send from the sending domain;
- adds the outgoing mail server AhaSend, which sends for senders on that domain.
Add the mail server yourself
To use an SMTP credential you created in the dashboard instead, add the mail server by hand:- In Odoo, go to Settings → General Settings → Emails.
- Turn on Use Custom Email Servers and click Save.
- Click Outgoing Email Servers, then New.
- Fill in the server with the values below.
- Click Test Connection. When Odoo confirms the connection, save the server.
On the Connection tab:
The From address of every email must be on your verified sending domain. See SMTP settings for the other ports.
Delivery tracking
Connect tracking
In the AhaSend delivery tracking box, click Connect tracking. Odoo creates a webhook named Odoo mail tracking (your database) in AhaSend with the message events and the Suppression Created event, and stores its signing secret. The box then shows Connected, and the webhook appears on the Webhooks page of the dashboard. Disconnect tracking deletes the webhook again. Odoo then stops receiving tracking events; the contact buttons keep working, since they only need the API key.Send a test email
- Open a contact with an email address you can read, and use Send message in the chatter. A log note is not emailed.
- Click the envelope icon next to the message in the chatter to open its tracking. It shows Delivered within seconds.
- Open the email. The tracking changes to Opened.
What Odoo shows
The module turns AhaSend’s message events into the statuses of Odoo’s mail tracking:
Odoo links each event to its email by the Message-ID header and the recipient address, so events for mail that another system sent are ignored. Opens and clicks that AhaSend detects as bots are ignored too. An event that arrives late never moves a status backwards: a late delivery event does not turn an opened email back into delivered.
A recipient who unsubscribes with an AhaSend unsubscribe link, or who reports an email as spam, is suppressed by AhaSend for the sending domain. Odoo gets the
suppression.created event for it and puts the address on its blacklist, so the mailings of Email Marketing skip the address too.
Sync from AhaSend
When Odoo missed webhook events, for example while it was down, click Sync from AhaSend in the AhaSend toolbox box. Odoo fetches the current status of every email of the last 2 days that is still sent, deferred or delivered, and shows how many got a new status. The sync goes back no further than AhaSend keeps the metadata of your messages: with a message metadata retention of 1 day, it checks the last day. How long AhaSend keeps the content of your messages does not matter. When your account has more email than one run can check, Odoo keeps what it found and tells you to run the sync again.Check a single email
An administrator can click Check AhaSend on a tracking record to fetch the status of that one email, whatever its age. This works as long as AhaSend still keeps the message, which depends on your plan and retention settings.Manage suppressions from a contact
On a contact, administrators see three AhaSend buttons next to Email bounced:- Check suppression marks the contact as bounced when AhaSend suppresses the address, and removes the mark when it no longer does.
- Suppress adds the address to your AhaSend suppressions for 365 days.
- Remove suppression removes it again.
Create the webhook yourself
To create the webhook in the dashboard instead of with Connect tracking, turn on Odoo’s developer mode. The AhaSend delivery tracking box then shows a Manual webhook setup section.- Copy the Endpoint URL. It has the form
https://odoo.example.com/mail/tracking/ahasend/<database>. - In the dashboard, create a webhook with that endpoint URL. Send all events, or at least the message events and Suppression Created: Odoo ignores the other events.
- Copy the webhook’s secret into Webhook secret in Odoo and save.
Inbound email
AhaSend receives the email for Odoo’s aliases, such assales@odoo.example.com, and posts each one to Odoo with a route. Odoo’s mail gateway handles it like email from a mail server: a reply lands on the record it answers, and an email to an alias creates a record, such as a lead or a ticket. Attachments and inline images are kept.
Prepare a domain for Odoo’s aliases
AhaSend receives the email of every address on the domain, so use a subdomain that only Odoo uses, such asodoo.example.com.
- In AhaSend, add the subdomain to your account.
- At your DNS provider, add the MX record that its domain details show, pointing to
mx.ahasend.com. Check it withdig MX odoo.example.com. - In Odoo, go to Settings → General Settings → Emails and set Alias Domain to the subdomain. Odoo’s aliases then use it.
- Make sure the message data retention of your account is 1 day or more. AhaSend discards inbound email at 0 days.
Connect inbound email
- In the AhaSend inbound email box, check Inbound domain. It is filled in with Odoo’s alias domain and must be the subdomain from the previous step.
- Click Connect inbound email and confirm. Odoo asks first, because it will get all email that AhaSend receives for the inbound domain, also email for addresses that Odoo does not know. Odoo then creates a route named Odoo inbound email (your database) in AhaSend for
*@the inbound domain, with attachments and headers, and one delivery per email. The box then shows Connected. - Send an email to one of Odoo’s aliases. It shows up in Odoo within seconds.
Create the route yourself
To create the route in the dashboard instead, turn on developer mode. The AhaSend inbound email box then shows a Manual route setup section.- Copy the Endpoint URL. It has the form
https://odoo.example.com/mail/inbound/ahasend/<database>. - Create a route with that endpoint URL and the recipient
*@odoo.example.com. Turn on attachments, headers and grouping by Message-ID, and leave reply stripping off. - Copy the route’s secret into Route secret in Odoo and save.
Email Marketing
AhaSend sends transactional and marketing email apart from each other: each sending domain has a sending type, Transactional or Marketing. With the Email Marketing module, the mailings of Odoo’s Email Marketing go out from a marketing domain of their own, and your other Odoo email stays on the domain it uses today. A large mailing then does not hold up your invoices and password resets.Prepare a marketing domain
In AhaSend, add a domain for your mailings, verify its DNS records and set its sending type to Marketing. Odoo does not change the sending type for you: it only connects a domain that you set to Marketing yourself. Use a subdomain that sends nothing else, such asnews.example.com.
Connect Email Marketing
- In Odoo, go to Settings → Email Marketing. In the Email Marketing through AhaSend setting, fill in Marketing domain.
- Click Connect Email Marketing.
- checks that the domain is in your account, verified, set to Marketing and not paused;
- creates an SMTP credential named Odoo Email Marketing (your database) that can only send from that domain;
- adds the outgoing mail server AhaSend marketing and makes it the Dedicated Server of Email Marketing;
- fills in Send from, the sender of new mailings: the name of your company, with the first part of its email address on the marketing domain. Change it to any address on that domain.
Send a mailing
Create a mailing as usual. It uses the AhaSend marketing mail server, and Send From on its Settings tab is your marketing sender. Mailings count towards your daily marketing limit. A mailing shows a warning when:- its Send From address is not on the marketing domain. AhaSend refuses the email of such a mailing, since the credential can only send from that domain;
- it has no mail server, like a draft from before you connected. Click Use the AhaSend marketing server in the warning.
Unsubscribes
Odoo adds its own unsubscribe link and one-click unsubscribe headers to every mailing. AhaSend keeps those headers when the link is anhttps:// address, so run Odoo on https://. Odoo then handles each unsubscribe itself, with the mailing list or its blacklist.
When Odoo’s address does not start with https://, AhaSend replaces the headers with its own link, and the Email Marketing through AhaSend setting shows a warning. A recipient who uses that link is suppressed in AhaSend for the marketing domain. With delivery tracking connected, Odoo puts the address on its blacklist as well.
Mailing statistics
AhaSend handles the bounces of your email. To see bounces and opens in the statistics of a mailing, install delivery tracking and connect it. The OCA modulemail_tracking_mass_mailing links the events to the mailing. It is in the same repository as mail_tracking, and installs itself next to Email Marketing when it is in the addons path.
With a Sending domain set in the AhaSend settings, the tracking webhook is limited to that domain. Connecting Email Marketing adds the marketing domain to the webhook.
Test copies
Copies of a production database, for testing, staging or trying an upgrade, hold the email addresses of real customers. Odoo’s neutralization keeps them from emailing anyone by turning all outgoing mail off, so testers cannot see what Odoo would have sent. With the sandbox module, a neutralized copy sends its email to the AhaSend sandbox, a test inbox, instead. AhaSend accepts every email, never delivers it, and shows it in the dashboard with its HTML and text content and its headers. Sandbox email does not count towards your monthly emails.Turn on test copies
In the production database, in the AhaSend for test databases box, click Turn on for test copies. Odoo creates a test-only login: an SMTP credential in sandbox mode named Odoo test copies (your database), limited to the sending domain when one is set, and stores its username and password. The button is safe to click: it changes nothing about how this database delivers its email. To use a credential you created in the dashboard instead, create an SMTP credential with Sandbox turned on. Turn on Odoo’s developer mode and fill in its username and password under Test-only login, set up by hand in the same box. AhaSend never delivers email sent with a sandbox credential, so it cannot send real email, also when a database dump with it ends up elsewhere. To send all email of a database that is not a copy to the sandbox too, for example to test before a go-live, set Send to the test inbox to Always in the same box. Odoo then sends every email through the AhaSend sandbox mail server, and nothing is delivered. Set it back to Automatic to deliver email again. Remove the test-only login removes the username and password from Odoo. Copies made after that send no email at all, as with Odoo’s own neutralization. The credential stays in your AhaSend account, where you can delete it.Make a copy
Neutralize the copy as usual, for example withodoo-bin neutralize. The neutralization then:
- turns off Odoo’s own neutralization mail server and adds an AhaSend sandbox mail server with the sandbox credential;
- adds the
AhaSend-Sandbox: trueheader to every email the copy sends, also through another mail server; - tags each email with
odoo-<database name>, so you can tell the email of several copies apart; - removes the API key and the secrets of the tracking webhook and the inbound route, so the copy cannot change anything in your account.
Test inbox in Odoo
With the test inbox module, testers read the email of a copy in Odoo itself, without the AhaSend dashboard or a separate tool such as Mailpit. A Test inbox app lists the email the copy sent, loaded from AhaSend, and shows each email as its recipient would see it. Nothing is delivered. Turn it on. In the production database, in the Test inbox in Odoo box below AhaSend for test databases, click Turn on the test inbox. Odoo creates an API key that may only read messages (messages:read), limited to the sending domain when one is set. Copies made from then on take this key with them: the neutralization removes the API key of the settings, but keeps this one.
Use it. In a copy, open the Test inbox app from Odoo’s main menu, or click the flask icon in the top bar. Open the test inbox in the settings box goes there too. The app shows only in a database whose email goes to the sandbox: a neutralized copy, or a database with Send to the test inbox set to Always. It only shows sandbox email sent from your Sending domain, and from the marketing domain of Email Marketing: an email that AhaSend lists with another status, such as one that was delivered for real, or one from another domain, stays out, also when it carries the tag of the copy. Without a Sending domain in the settings, email from every domain of your account counts.
- The list shows the newest email first. Search with words, or with
from:,to:,subject:,tag:,is:unread,has:attachment,before:andafter:and a date such as2026-11-30. Put-before a filter to leave it out. - Each email has the tabs HTML, Text, Headers, Source and Attachments. The HTML shows at desktop, tablet or phone width, with remote images blocked until you click Show remote images. Download the email as an
.emlfile, or a screenshot of it. - Link check opens every link and image of the email and marks the ones that fail. It does not open links that act, such as unsubscribe or confirmation links.
- HTML check shows how well mail programs support the HTML and CSS of the email, with the data of caniemail.com.
- Email sent from an Odoo document gets the kind of document as a tag, with a link to the document and to the contact it went to. A contact has a Test inbox button with the email sent to it.
- A counter in the top bar shows the unread email, and a notification appears when new email arrives.
- Send test email sends a test email through the sandbox mail server of the copy, to an address you choose. It shows up in the test inbox after a few seconds and is never delivered.
messages:read:{domain} or messages:read:all. Turn on developer mode and fill it in under Test inbox key, also in a copy made before the key existed. Turn off the test inbox removes the key from Odoo and, when Odoo created it, deletes it in AhaSend, so copies stop loading email.
The test inbox has no spam score: the Management API gives none for an email.
Troubleshooting
AhaSend can only call a public https:// address
AhaSend can only call a public https:// address
Connect tracking and Connect inbound email refuse an Odoo URL that does not start with
https://, such as http://localhost:8069. Set Odoo URL to the address where AhaSend reaches your Odoo from the internet. To test on your own computer, a tunnel such as ngrok gives you a temporary https:// address.Sending fails with 535 AUTH invalid
Sending fails with 535 AUTH invalid
AhaSend does not accept the SMTP login. Right after Send through AhaSend or Connect Email Marketing this is expected: a new SMTP credential can take up to 2 minutes to work. Retry the failed emails then. When it stays this way, the credential was deleted in AhaSend: disconnect and connect again.
Emails stay on Sent
Emails stay on Sent
Check that the webhook exists and is enabled on the Webhooks page, and that its endpoint URL reaches your Odoo. Odoo answers
401 when the signature does not match the webhook secret: click Disconnect tracking and Connect tracking again to store a fresh secret. AhaSend disables a webhook after more than 100 consecutive failed attempts. Click Sync from AhaSend to update the emails that were sent in the meantime.Connect inbound email says the domain is not in your account
Connect inbound email says the domain is not in your account
AhaSend only routes the email of a domain in your account. Add the inbound domain in AhaSend and point its MX record to
mx.ahasend.com, as in Prepare a domain for Odoo’s aliases. Then click Connect inbound email again.Inbound email does not arrive in Odoo
Inbound email does not arrive in Odoo
Check that the MX record of the inbound domain points to
mx.ahasend.com, that the inbound domain is in your AhaSend account, and that Odoo’s Alias Domain is the same domain. Check that the route is enabled and that your message data retention is 1 day or more. A sender who gets a bounce with code 556 wrote to a domain that is not in any AhaSend account; see what AhaSend rejects.A copy still sends nothing
A copy still sends nothing
The sandbox server is only added when the production database held a sandbox credential at the time of the copy. Turn on developer mode in the copy, fill in the credential under Test-only login, set up by hand and click Use the AhaSend test inbox.
The test inbox stays empty or shows an error
The test inbox stays empty or shows an error
The test inbox needs its key: in the production database, click Turn on the test inbox and make a new copy, or fill in Test inbox key in the copy. When Odoo says that AhaSend refused the request from this server, the key’s IP allow list does not hold the address of the copy’s server: add it under IP Allow List in the production database. The copy only shows email that it sent itself, tagged with its own database name.
Odoo answers AhaSend with 404
Odoo answers AhaSend with 404
AhaSend calls Odoo without a session, so Odoo must know the database from the request alone. That works when the server runs one database, or when
dbfilter selects one database for the host name AhaSend calls. A server that lists several databases for that host name answers 404. The database name at the end of the endpoint URLs does not select the database: it makes Odoo refuse a delivery that was made for another database.Related guides
- The modules on GitHub: AhaSend/odoo-ahasend.
- SMTP settings, SMTP credentials and domain setup.
- Webhooks, webhook events and API key scopes.
- Inbound routing and sandbox mode.
- Sending type, daily marketing limit and unsubscribe headers.
- Bounces and suppressions, open tracking and retention.

