from django.template.loader import render_to_string 
from django.core.mail import EmailMessage
from django.conf import settings

class Mail:
	@staticmethod
	def send_email(data):
		try:
			# html_template = 'account-approve-email.html'
			# html_message = render_to_string(html_template, {'context': data['user'] })
			from_email = settings.EMAIL_HOST_USER
			message = EmailMessage(subject=data['email_subject'] , body=data['body']  , to=[data['to_email']] )
			message.content_subtype = 'html'
			message.send()
			return True
		except Exception as e :
			print(e)
			pass
