Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
1671 Prikazi

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
Opusti
Best Answer

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
Opusti
Best Answer

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

Avatar
Opusti
Avtor

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

Related Posts Odgovori Prikazi Aktivnost
1
dec. 23
917
3
avg. 25
2641
1
maj 25
2660
1
apr. 25
3655
1
apr. 25
4512