Browse Source

[FIX] mail_tracking: Obtain outgoing server with sudo

As regular users can't access this object.
pull/154/head
Pedro M. Baeza 8 years ago
parent
commit
84ffd73fc5
  1. 5
      mail_tracking/models/ir_mail_server.py

5
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,

Loading…
Cancel
Save