コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
1764 ビュー

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

関連投稿 返信 ビュー 活動
1
8月 25
2035
2
8月 25
632
2
3月 25
1567
1
2月 25
2025
1
12月 24
2519