def send_email(template, context, to, subject): email = TemplateEmailer( template=template, context=context, subject=subject, to=to, ) email.send()
def test_email(): templates = ['flights/emails/set_up_notifications.html',] for template in templates: email = TemplateEmailer( template=template, context={}, subject='testing', to=['*****@*****.**',], ) email.send()
def test_email(): templates = ["flights/emails/set_up_notifications.html"] for template in templates: email = TemplateEmailer(template=template, context={}, subject="testing", to=["*****@*****.**"]) email.send()
def send_email(template, context, to, subject): email = TemplateEmailer(template=template, context=context, subject=subject, to=to) email.send()