Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
1499 Tampilan

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

Avatar
Buang
Jawaban Terbai

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
Buang
Jawaban Terbai

Any update?

Avatar
Buang

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

Post Terkait Replies Tampilan Aktivitas
1
Agu 25
1727
2
Agu 25
295
2
Mar 25
1314
1
Feb 25
1620
1
Des 24
2134