Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
1185 Vues

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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Meilleure réponse

Any update?

Avatar
Ignorer

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

Publications associées Réponses Vues Activité
2
mars 25
974
1
févr. 25
1149
1
déc. 24
1700
0
déc. 24
1466
2
sept. 24
1297