def send_order_email(request, order):
 settings.clear_cache()
 order_context = {u'order': order, u'request': request, u'order_items': order.items.all()}
 order_context.update(order.details_as_dict())
 try:
  get_template(u'shop/email/order_receipt.html')
 except TemplateDoesNotExist:
  receipt_template = u'email/order_receipt'
 else:
  receipt_template = u'shop/email/order_receipt'
  from warnings import warn
  warn(u'Shop email receipt templates have moved from templates/shop/email/ to templates/email/')
 send_mail_template(settings.SHOP_ORDER_EMAIL_SUBJECT, receipt_template, settings.SHOP_ORDER_FROM_EMAIL, order.billing_detail_email, context=order_context, addr_bcc=(settings.SHOP_ORDER_EMAIL_BCC or None))

def send_order_email ( request , order ) : settings . clear_cache ( ) order_context = { u'order' : order , u'request' : request , u'order_items' : order . items . all ( ) } order_context . update ( order . details_as_dict ( ) ) try : get_template ( u'shop/email/order_receipt.html' ) except TemplateDoesNotExist : receipt_template = u'email/order_receipt' else : receipt_template = u'shop/email/order_receipt' from warnings import warn warn ( u'Shop email receipt templates have moved from templates/shop/email/ to templates/email/' ) send_mail_template ( settings . SHOP_ORDER_EMAIL_SUBJECT , receipt_template , settings . SHOP_ORDER_FROM_EMAIL , order . billing_detail_email , context = order_context , addr_bcc = ( settings . SHOP_ORDER_EMAIL_BCC or None ) )
send order receipt email on successful order .