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

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

Avatar
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

Any update?

Avatar
Abbandona

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

Post correlati Risposte Visualizzazioni Attività
2
mar 25
1036
1
feb 25
1245
1
dic 24
1764
0
dic 24
1529
2
set 24
1337