From 9b264e15df47bda087e0b82902c53c8021bbab4f Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Tue, 9 Feb 2016 15:18:45 +0100 Subject: [PATCH] Added quit method in sendmail class --- paramecio/citoplasma/sendmail.py | 4 +++- tests/sendmailtest.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/paramecio/citoplasma/sendmail.py b/paramecio/citoplasma/sendmail.py index 82858d8..f5b1f25 100644 --- a/paramecio/citoplasma/sendmail.py +++ b/paramecio/citoplasma/sendmail.py @@ -154,5 +154,7 @@ class SendMail: return True - + def quit(self): + + self.smtp.quit() \ No newline at end of file diff --git a/tests/sendmailtest.py b/tests/sendmailtest.py index 05122d1..8d2f723 100644 --- a/tests/sendmailtest.py +++ b/tests/sendmailtest.py @@ -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 html and attachments', content_type='html', attachments=['tests/images/image.jpg']) ) - s.smtp.quit() \ No newline at end of file + s.quit() \ No newline at end of file