Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
1826 Visualizações

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

Avatar
Cancelar
Melhor resposta

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
Cancelar
Melhor resposta

Any update?

Avatar
Cancelar

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

Publicações relacionadas Respostas Visualizações Atividade
1
ago. 25
2079
2
ago. 25
740
2
mar. 25
1641
1
fev. 25
2089
1
dez. 24
2579