mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Switch to default mail from variable
This commit is contained in:
@@ -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
|
# Mail the admins to inform them of a new request
|
||||||
ctx = Context({'request': obj})
|
ctx = Context({'request': obj})
|
||||||
to_email = group.admins.values_list('email', flat=True)
|
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')
|
msg.attach_alternative(get_template(email_html_template).render(ctx), 'text/html')
|
||||||
mag.send(fail_silently=True)
|
mag.send(fail_silently=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user