[FIX] mail: manage Environment before using it
[FIX] mail: manage Environment before using it

This is needed for crons that happen to send notifications. Without it,
the email sending was delayed until the `process email queue` cron run.

hip-odoo/odoo,dfang/odoo,ygol/odoo,hip-odoo/odoo,ygol/odoo,hip-odoo/odoo,dfang/odoo,hip-odoo/odoo,dfang/odoo,ygol/odoo,ygol/odoo,ygol/odoo,hip-odoo/odoo,dfang/odoo,hip-odoo/odoo,dfang/odoo,ygol/odoo,ygol/odoo,dfang/odoo