<commit_before><?php
/**  
 * Mail class
 * 
 * Handles mail activity
 * 	
 * @access		public
 */
 
class Mail {
			
  /**
   * Sends a simple mail message to $to, with $body as the body
   * and $subject as the subject
   *
   * @return  bool
   */
  function SimpleMail($to, $subject, $body, $attachFooter = true, $bcc = false) {
   
   $from = "".UNIVERSITY." Humans vs. Zombies <".EMAIL.">";
   $sig = "\r\nThanks,\n".UNIVERSITY." Humans vs. Zombies";
   
    // $to can be single email or comma seperated
    // $bcc = false;
    
    if ($bcc) {
      $headers = '';
      $headers .= 'From: '.$from . "\r\n";
      $headers .= 'Reply-To: '.EMAIL.'' . "\r\n";
      $headers .= 'Bcc: '.$to . "\r\n";
      $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";

      if ($attachFooter) {
        $body = $body.$sig;
      }
      
      if (mail(ARCHIVE_EMAIL, $subject, $body, $headers)) {
        return true;
      } else {
        return false;
      }
    } else {
      $headers = '';
      $headers .= 'From: '.$from . "\r\n";
      $headers .= 'Reply-To: '.EMAIL.'' . "\r\n";
      $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";

      if ($attachFooter) {
        $body = $body.$sig;
      }
      
      if (mail($to, $subject, $body, $headers)) {
        return true;
      } else {
        return false;
      }
    }
    
  }
  
  /*
  *   Validates an email address per PHP standard
  *
  *   @return bool<commit_msg>Updating email address<commit_after><?php
/**  
 * Mail class
 * 
 * Handles mail activity
 * 	
 * @access		public
 */
 
class Mail {
			
  /**
   * Sends a simple mail message to $to, with $body as the body
   * and $subject as the subject
   *
   * @return  bool
   */
  function SimpleMail($to, $subject, $body, $attachFooter = true, $bcc = false) {
   
   $from = "".UNIVERSITY." Humans vs. Zombies <".EMAIL.">";
   $sig = "\r\nThanks,\n".UNIVERSITY." Humans vs. Zombies";
   
    // $to can be single email or comma seperated
    // $bcc = false;
    
    if ($bcc) {
      $headers = '';
      $headers .= 'From: '.$from . "\r\n";
      $headers .= 'Reply-To: '.EMAIL_REPLY_TO.'' . "\r\n";
      $headers .= 'Bcc: '.$to . "\r\n";
      $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";

      if ($attachFooter) {
        $body = $body.$sig;
      }
      
      if (mail(ARCHIVE_EMAIL, $subject, $body, $headers)) {
        return true;
      } else {
        return false;
      }
    } else {
      $headers = '';
      $headers .= 'From: '.$from . "\r\n";
      $headers .= 'Reply-To: '.EMAIL_REPLY_TO.'' . "\r\n";
      $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";

      if ($attachFooter) {
        $body = $body.$sig;
      }
      
      if (mail($to, $subject, $body, $headers)) {
        return true;
      } else {
        return false;
      }
    }
    
  }
  
  /*
  *   Validates an email address per PHP standard
  *
  *   @return bool
{'fraction_non_alphanumeric': 0.18662092624356774, 'fraction_numerical': 0.0, 'mean_word_length': 1.7125581395348837, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6373001', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1045, 'n_words': 261}