Commit 1ae3b8de authored by John Red Medrano's avatar John Red Medrano

email to admin upon bulk create user

parent 958026ea
...@@ -10,6 +10,7 @@ from io import BytesIO ...@@ -10,6 +10,7 @@ from io import BytesIO
from django.http import HttpResponse from django.http import HttpResponse
from django.template.loader import get_template from django.template.loader import get_template
from xhtml2pdf import pisa from xhtml2pdf import pisa
from email.mime.text import MIMEText
def to_pdf(): def to_pdf():
...@@ -66,11 +67,12 @@ def batch_email_admin(args): ...@@ -66,11 +67,12 @@ def batch_email_admin(args):
including personal information protected by privacy laws. including personal information protected by privacy laws.
It is intended only for the use of the individual or entity to whom they are addressed. It is intended only for the use of the individual or entity to whom they are addressed.
""" """
msg = MIMEText(body)
email = EmailMessage( email = EmailMessage(
'Resource Management System: Bulk Users!', 'Resource Management System: Bulk Users!',
body, body,
[settings.EMAIL_DEFAULT_SENDER], settings.EMAIL_DEFAULT_SENDER,
[recipient] [recipient]
) )
email.attach_file(filename) email.attach_file(filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment