def _send_decision_email(instance):
 context = {'name': instance.user.username, 'api_management_url': urlunsplit((('https' if (settings.HTTPS == 'on') else 'http'), instance.site.domain, reverse('api_admin:api-status'), '', '')), 'authentication_docs_url': settings.AUTH_DOCUMENTATION_URL, 'api_docs_url': settings.API_DOCUMENTATION_URL, 'support_email_address': settings.API_ACCESS_FROM_EMAIL, 'platform_name': configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME)}
 message = render_to_string('api_admin/api_access_request_email_{status}.txt'.format(status=instance.status), context)
 try:
  send_mail(_('API access request'), message, settings.API_ACCESS_FROM_EMAIL, [instance.user.email], fail_silently=False)
  instance.contacted = True
 except SMTPException:
  log.exception('Error sending API user notification email for request [%s].', instance.id)

def _send_decision_email ( instance ) : context = { 'name' : instance . user . username , 'api_management_url' : urlunsplit ( ( ( 'https' if ( settings . HTTPS == 'on' ) else 'http' ) , instance . site . domain , reverse ( 'api_admin:api-status' ) , '' , '' ) ) , 'authentication_docs_url' : settings . AUTH_DOCUMENTATION_URL , 'api_docs_url' : settings . API_DOCUMENTATION_URL , 'support_email_address' : settings . API_ACCESS_FROM_EMAIL , 'platform_name' : configuration_helpers . get_value ( 'PLATFORM_NAME' , settings . PLATFORM_NAME ) } message = render_to_string ( 'api_admin/api_access_request_email_{status}.txt' . format ( status = instance . status ) , context ) try : send_mail ( _ ( 'API access request' ) , message , settings . API_ACCESS_FROM_EMAIL , [ instance . user . email ] , fail_silently = False ) instance . contacted = True except SMTPException : log . exception ( 'Error sending API user notification email for request [%s].' , instance . id )
send an email to requesting user with the decision made about their request .