Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1350 Vistas

Where can I change in code, so that email_from is changed when I send mail from chatter?

Avatar
Descartar
Mejor respuesta

Hi,

You can customize the sender email (email_from) for chatter messages by overriding the message_post method. For example:

class MailThread(models.AbstractModel):

    _inherit = 'mail.thread'


    @api.model

    def message_post(self, **kwargs):

        if not kwargs.get('email_from'):

            kwargs['email_from'] = 'custom_email@example.com'  # Set your custom email address

        return super().message_post(**kwargs)

This will set a custom sender email if one is not provided when posting a message.


Hope it helps

Avatar
Descartar
Mejor respuesta

Any update?

Avatar
Descartar

Is this problem solved? More information here: https://101games.io/solar-smash

Publicaciones relacionadas Respuestas Vistas Actividad
2
mar 25
1217
1
feb 25
1448
1
dic 24
1963
0
dic 24
1575
2
sept 24
1427