跳至内容
菜单
此问题已终结
2 回复
1143 查看

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

形象
丢弃
最佳答案

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

形象
丢弃
最佳答案

Any update?

形象
丢弃

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

相关帖文 回复 查看 活动
2
3月 25
927
1
2月 25
1083
1
12月 24
1636
0
12月 24
1375
2
9月 24
1251