Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
908 Visualizzazioni

Hello,

Is it possible to send emails while the database is in a neutralized mode for testing purposes (staging)? I'm working on a migration and need a solution for this phase. I’ve already activated the outgoing mail server, and it works in production, but I’m looking for a way to make it functional in this testing context. Has anyone encountered this issue or found an effective workaround?

Thank you in advance!

Avatar
Abbandona
Risposta migliore

For Odoo.sh databases, Use the Mails tab to access the Mail Catcher

https://www.odoo.com/documentation/18.0/administration/odoo_sh/getting_started/branches.html#mails

Avatar
Abbandona
Risposta migliore

Hi,


Yes, it's possible to test emails in a neutralized Odoo database safely.


If you want to prevent emails from going to real contacts but still test the flow, you can overwrite all res_partner emails (excluding internal users) using this SQL query via psql:


UPDATE res_partner

SET email = 'test.yourname@example.com'

WHERE email IS NOT NULL

  AND id NOT IN (

    SELECT partner_id FROM res_users WHERE partner_id IS NOT NULL

  );


This updates only external contacts, leaving internal user-linked partners untouched.


Hope it helps.

Avatar
Abbandona