[FIX] tools.email_send: use correct kwarg

bzr revid: chs@openerp.com-20120306173319-6tmhco83w0we5hl6
This commit is contained in:
Christophe Simonis 2012-03-06 18:33:19 +01:00
parent e4459562f2
commit 91b8829050
2 changed files with 3 additions and 4 deletions

View File

@ -2,7 +2,7 @@
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP S.A (<http://www.openerp.com>) # Copyright (C) 2011-2012 OpenERP S.A (<http://www.openerp.com>)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
@ -364,7 +364,6 @@ class ir_mail_server(osv.osv):
:param smtp_user: optional SMTP user, if mail_server_id is not passed :param smtp_user: optional SMTP user, if mail_server_id is not passed
:param smtp_password: optional SMTP password to use, if mail_server_id is not passed :param smtp_password: optional SMTP password to use, if mail_server_id is not passed
:param smtp_debug: optional SMTP debug flag, if mail_server_id is not passed :param smtp_debug: optional SMTP debug flag, if mail_server_id is not passed
:param debug: whether to turn on the SMTP level debugging, output to DEBUG log level
:return: the Message-ID of the message that was just sent, if successfully sent, otherwise raises :return: the Message-ID of the message that was just sent, if successfully sent, otherwise raises
MailDeliveryException and logs root cause. MailDeliveryException and logs root cause.
""" """

View File

@ -3,7 +3,7 @@
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
@ -383,7 +383,7 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
res = mail_server_pool.send_email(cr, uid or 1, email_msg, mail_server_id=None, res = mail_server_pool.send_email(cr, uid or 1, email_msg, mail_server_id=None,
smtp_server=smtp_server, smtp_port=smtp_port, smtp_user=smtp_user, smtp_password=smtp_password, smtp_server=smtp_server, smtp_port=smtp_port, smtp_user=smtp_user, smtp_password=smtp_password,
smtp_encryption=('ssl' if ssl else None), debug=debug) smtp_encryption=('ssl' if ssl else None), smtp_debug=debug)
except Exception: except Exception:
_logger.exception("tools.email_send failed to deliver email") _logger.exception("tools.email_send failed to deliver email")
return False return False