Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
911 Представления

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!

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Лучший ответ

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.

Аватар
Отменить