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

Hi all,


In Odoo, we want to use Mailjet to send out marketing emails. We have set up an outgoing mail server for this, however we want to strictly use this for only marketing. Hence, we also added this as a dedicated server.

Problem now is: we want to continue using the default Odoo mail server for other mail communication. How can we do this? Odoo will now use Mailjet for all outgoing, not just marketing mails.


Thanks

Avatar
Zrušit
Nejlepší odpověď

You have to add a new field to ir.mail_server  model in order to know which server is for mass mailing: 
mass_mailing_server = fields.Boolean()

Then override method connect(....)  and change the code where is searching for the first server available.

mail_server = smtp_encryption = None
if mail_server_id:            
​mail_server = self.sudo().browse(mail_server_id)        
elif not host:            
​mail_server = self.sudo().search([('mass_mailing_server', '=', False)], order='sequence', limit=1)

This is tested on v14.

Avatar
Zrušit
Nejlepší odpověď

Did you already find a solution for this? I am having the same problem

Avatar
Zrušit
Autor

Not yet unfortunately. It also apparently works different in v17 vs v16.

Related Posts Odpovědi Zobrazení Aktivita
1
pro 23
919
3
srp 25
2698
1
kvě 25
2687
1
dub 25
3674
1
dub 25
4526