diff options
Diffstat (limited to 'askbot/utils/email.py')
-rw-r--r-- | askbot/utils/email.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/askbot/utils/email.py b/askbot/utils/email.py index 8f719e82..34b11c45 100644 --- a/askbot/utils/email.py +++ b/askbot/utils/email.py @@ -1,11 +1,18 @@ from django.core.mail import EmailMultiAlternatives -from django.conf import settings +from django.conf import settings as django_settings from django.template import loader, Context from django.utils.html import strip_tags from threading import Thread -def send_email(subject, recipients, template, context={}, sender=settings.DEFAULT_FROM_EMAIL, txt_template=None): - context['settings'] = settings +def send_email( + subject, + recipients, + template, + context = {}, + sender = django_settings.DEFAULT_FROM_EMAIL, + txt_template = None + ): + context['settings'] = django_settings html_body = loader.get_template(template).render(Context(context)) if txt_template is None: |