Switch to default mail from variable

This commit is contained in:
2011-09-30 09:35:01 +01:00
parent 0b7055ee26
commit d3beb067ab

View File

@@ -9,7 +9,7 @@ def send_group_mail(request, to_email, subject, email_text_template, email_html_
# Mail the admins to inform them of a new request
ctx = Context({'request': obj})
to_email = group.admins.values_list('email', flat=True)
msg = EmailMultiAlternatives(subject, get_template(email_text_template).render(ctx), getattr(settings, 'SERVER_EMAIL', 'auth@pleaseignore.com'), to_email)
msg = EmailMultiAlternatives(subject, get_template(email_text_template).render(ctx), getattr(settings, 'DEFAULT_FROM_EMAIL', 'auth@pleaseignore.com'), to_email)
msg.attach_alternative(get_template(email_html_template).render(ctx), 'text/html')
mag.send(fail_silently=True)