Skip to Content
Menu
This question has been flagged
2 Replies
1246 Rodiniai

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

Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Best Answer

Any update?

Portretas
Atmesti

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

Related Posts Replies Rodiniai Veikla
2
kov. 25
1035
1
vas. 25
1239
1
gruod. 24
1760
0
gruod. 24
1524
2
rugs. 24
1336