def _send_mail(subject, sender, to, template_name, context): body = render_to_string(template_name, context) mail.send_mail(subject, body, sender, to)