Added method for send email
This commit is contained in:
parent
97ab25c162
commit
1a0d11d829
2 changed files with 119 additions and 0 deletions
17
tests/sendmailtest.py
Normal file
17
tests/sendmailtest.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from settings import config
|
||||
from paramecio.citoplasma import sendmail
|
||||
import unittest
|
||||
|
||||
class TestFieldMethods(unittest.TestCase):
|
||||
|
||||
def test_sendmail(self):
|
||||
|
||||
s=sendmail.SendMail()
|
||||
|
||||
#self.assertEqual(phrase, 'this---is-a-crap-phrase-o---f-oh-yeah--')
|
||||
|
||||
self.assertTrue( s.send(config.portal_email, [config.email_test], 'This is a test', 'A message for test a simple email method', content_type='plain', attachments=[]) )
|
||||
|
||||
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>', content_type='html', attachments=[]) )
|
||||
|
||||
s.smtp.quit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue