def make_mail(subject, text_template, html_template, context_vars, from_email, to_email, headers=None, **extra_kwargs):
 default_headers = {'Reply-To': settings.DEFAULT_REPLY_TO_EMAIL}
 if (headers is not None):
  default_headers.update(headers)
 headers = default_headers
 mail = EmailMultiAlternatives(subject, render_email(text_template, context_vars), from_email, [to_email], headers=headers, **extra_kwargs)
 if html_template:
  html = transform(render_email(html_template, context_vars), ('https://' + Site.objects.get_current().domain))
  mail.attach_alternative(html, 'text/html')
 return mail

def make_mail ( subject , text_template , html_template , context_vars , from_email , to_email , headers = None , ** extra_kwargs ) : default_headers = { 'Reply-To' : settings . DEFAULT_REPLY_TO_EMAIL } if ( headers is not None ) : default_headers . update ( headers ) headers = default_headers mail = EmailMultiAlternatives ( subject , render_email ( text_template , context_vars ) , from_email , [ to_email ] , headers = headers , ** extra_kwargs ) if html_template : html = transform ( render_email ( html_template , context_vars ) , ( 'https://' + Site . objects . get_current ( ) . domain ) ) mail . attach_alternative ( html , 'text/html' ) return mail
return an instance of emailmultialternative with both plaintext and html versions .