Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
1490 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

Any update?

Avatar
Zrušit

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

Related Posts Odpovědi Zobrazení Aktivita
1
srp 25
1716
2
srp 25
272
2
bře 25
1308
1
úno 25
1610
1
pro 24
2123