You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
686 B

# -*- coding: utf-8 -*-
# © 2017 initOS GmbH <https://www.initos.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import mock
from openerp.tests.common import TransactionCase
class TestBaseMailBcc(TransactionCase):
def test_base_mail_bcc(self):
ir_mail_server = self.env['ir.mail_server']
message = ir_mail_server.build_email(
email_from='admin@example.com',
email_to='admin@example.com',
email_bcc='unused@example.com',
subject='An example E-Mail',
body='With an example body',
)
with mock.patch("smtplib.SMTP"):
ir_mail_server.send_email(message)