Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
1664 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

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

Avatar
Abbandona
Autore

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

Post correlati Risposte Visualizzazioni Attività
1
dic 23
911
3
ago 25
2636
1
mag 25
2657
1
apr 25
3651
1
apr 25
4505