From 7bd1b1a977e3d1760c94fe2d07a6db66be22098b Mon Sep 17 00:00:00 2001 From: Jayaram Pai Date: Mon, 23 Dec 2013 18:22:49 +0530 Subject: checking multiple receipients --- website/views.py | 16 ++++++++++------ 1 file 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.
- Category: OpenFOAM
- Tutorial: Tokens
- http://google.com
- """ - email = EmailMultiAlternatives(subject, message, 'forums', ['rush2jrp@gmail.com'], headers={"Content-type":"text/html;charset=iso-8859-1"}) + Category: {0}
+ Tutorial: {1}
+ {2}
+ """.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") -- cgit