def _send_email(name, email):
 config = __salt__['config.option']('splunk')
 email_object = config.get('email')
 if email_object:
  cc = email_object.get('cc')
  subject = email_object.get('subject')
  message = email_object.get('message').format(name, name, _generate_password(email), name)
  try:
   mail_process = subprocess.Popen(['mail', '-s', subject, '-c', cc, email], stdin=subprocess.PIPE)
  except Exception as e:
   log.error('unable to send email to {0}: {1}'.format(email, str(e)))
  mail_process.communicate(message)
  log.info('sent account creation email to {0}'.format(email))

def _send_email ( name , email ) : config = __salt__ [ 'config.option' ] ( 'splunk' ) email_object = config . get ( 'email' ) if email_object : cc = email_object . get ( 'cc' ) subject = email_object . get ( 'subject' ) message = email_object . get ( 'message' ) . format ( name , name , _generate_password ( email ) , name ) try : mail_process = subprocess . Popen ( [ 'mail' , '-s' , subject , '-c' , cc , email ] , stdin = subprocess . PIPE ) except Exception as e : log . error ( 'unable to send email to {0}: {1}' . format ( email , str ( e ) ) ) mail_process . communicate ( message ) log . info ( 'sent account creation email to {0}' . format ( email ) )
sends an email using nflgame .