Added quit method in sendmail class

This commit is contained in:
Antonio de la Rosa 2016-02-09 15:18:45 +01:00
parent 726d778808
commit 9b264e15df
2 changed files with 4 additions and 2 deletions

View file

@ -154,5 +154,7 @@ class SendMail:
return True return True
def quit(self):
self.smtp.quit()

View file

@ -16,4 +16,4 @@ class TestFieldMethods(unittest.TestCase):
self.assertTrue( s.send(config.portal_email, config.email_test, 'This is a test', 'A message for test a simple email method in <b>html</b> and attachments', content_type='html', attachments=['tests/images/image.jpg']) ) self.assertTrue( s.send(config.portal_email, config.email_test, 'This is a test', 'A message for test a simple email method in <b>html</b> and attachments', content_type='html', attachments=['tests/images/image.jpg']) )
s.smtp.quit() s.quit()