Beispiel #1
0
 def test_modified_message(self):
     mail = MailManager(self.app).driver('mailgun').to(
         '*****@*****.**').text('test text')
     data = mail.message()
     data['o:tag'] = ['Foo', 'Bar']
     data = mail.send(data)
     self.assertEqual(data['o:tag'], ['Foo', 'Bar'])
Beispiel #2
0
 def test_mail_text_and_html_content(self):
     mail = MailManager(self.app).driver('smtp').to('*****@*****.**').text(text_content).html(html_content)
     self.assertIn(html_content, mail.html_content)
     self.assertEqual(mail.message_body, mail.html_content)
     self.assertEqual(mail.text_content, text_content)
     _, _, message_as_string = mail.send()
     self.assertIn('Content-Type: text/plain', message_as_string)
     self.assertIn('Content-Type: text/html', message_as_string)
Beispiel #3
0
 def test_modified_message(self):
     mail = MailManager(self.app).driver('smtp').to('*****@*****.**').text(text_content).html(html_content)
     message = mail.message()
     message['Bcc'] = '*****@*****.**'
     _, _, message_as_string = mail.send(message)
     self.assertIn('Bcc: [email protected]\n', message_as_string)