Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
1239 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

Any update?

Imagine profil
Abandonează

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

Related Posts Răspunsuri Vizualizări Activitate
2
mar. 25
1030
1
feb. 25
1233
1
dec. 24
1753
0
dec. 24
1516
2
sept. 24
1327