تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1588 أدوات العرض

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
أغسطس 25
1844
2
أغسطس 25
508
2
مارس 25
1414
1
فبراير 25
1780
1
ديسمبر 24
2278