From 015f796404b4e50e34d6df01d838aea12c528e61 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 10 Feb 2017 12:14:11 +0100 Subject: [PATCH] [FIX] mail_tracking: Obtain outgoing server with sudo As regular users can't access this object. --- mail_tracking/models/ir_mail_server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mail_tracking/models/ir_mail_server.py b/mail_tracking/models/ir_mail_server.py index 2908ee77..2877d6ce 100644 --- a/mail_tracking/models/ir_mail_server.py +++ b/mail_tracking/models/ir_mail_server.py @@ -74,8 +74,9 @@ class IrMailServer(models.Model): smtp_encryption=None, smtp_debug=False): message_id = False tracking_email = self._tracking_email_get(message) - smtp_server_used = self._smtp_server_get( - mail_server_id, smtp_server) + smtp_server_used = self.sudo()._smtp_server_get( + mail_server_id, smtp_server, + ) try: message_id = super(IrMailServer, self).send_email( message, mail_server_id=mail_server_id,