diff options
author | Jayaram Pai | 2013-12-23 18:22:49 +0530 |
---|---|---|
committer | Jayaram Pai | 2013-12-23 18:22:49 +0530 |
commit | 7bd1b1a977e3d1760c94fe2d07a6db66be22098b (patch) | |
tree | cd3ea7f1a467a5eeeb849f6081f3851b3383866d | |
parent | db32b9c5768c5572f174f25911d95b9ee99e760e (diff) | |
download | FOSSEE-Forum-7bd1b1a977e3d1760c94fe2d07a6db66be22098b.tar.gz FOSSEE-Forum-7bd1b1a977e3d1760c94fe2d07a6db66be22098b.tar.bz2 FOSSEE-Forum-7bd1b1a977e3d1760c94fe2d07a6db66be22098b.zip |
checking multiple receipients
-rw-r--r-- | website/views.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/website/views.py b/website/views.py index 098f552..0e74616 100644 --- a/website/views.py +++ b/website/views.py @@ -336,11 +336,15 @@ def test(request): subject = 'New Forum Question' message = """ A new question has been posted in the Spoken-Tutorial Forum. <br> - Category: OpenFOAM <br> - Tutorial: Tokens <br> - <a href="http://google.com" target="_blank">http://google.com</a> <br> - """ - email = EmailMultiAlternatives(subject, message, 'forums', ['rush2jrp@gmail.com'], headers={"Content-type":"text/html;charset=iso-8859-1"}) + Category: {0}<br> + Tutorial: {1}<br> + <a href="{2}">{2}</a> <br> + """.format('Test Cat', 'Test Tut', 'http://spoken-tutorial.org') + email = EmailMultiAlternatives( + subject,'', 'forums', + ['rush2jrp@gmail.com', 'vishnukraj007@gmail.com'], + headers={"Content-type":"text/html;charset=iso-8859-1"} + ) email.attach_alternative(message, "text/html") - email.send() + email.send(fail_silently=True) return HttpResponse("done") |