Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
1679 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Meilleure réponse

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

Avatar
Ignorer
Auteur

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

Publications associées Réponses Vues Activité
1
déc. 23
918
3
août 25
2648
1
mai 25
2664
1
avr. 25
3664
1
avr. 25
4518