def send_rendered_mail(subject, template_name, context_dict, from_email, to, attachments=[], cc=[], bcc=[]):
rendered = render_to_string(u"<STR_LIT>".format(template_name), context_dict)<EOL>text_content = render_to_string(u"<STR_LIT>".format(template_name), context_dict)<EOL>return send_mail(subject, text_content, from_email, to, rendered, attachments, cc=cc, bcc=bcc)<EOL>
It sends mail after rendering html content and normal text using two different template (.html, .txt) with
the same name.

:param subject:
:param template_name: without file extension
:param context_dict:
:param from_email:
:param to:
:param attachments: