How to send an email with pdf or attachment and html using django
from django.core.mail import EmailMessage
email_template =render_to_string('accounts/email.html')
send_mail=EmailMessage('Your Enrollment: ',email_template, [settings.EMAIL_HOST_USER, Email] , [Email])
send_mail.attach_file('static/pdf/ENROLLMENT-PROCEDURE-2021-.pdf')
send_mail.send()
print(send_mail)
this is the email I received