, DQ; , echo DQDQ; , echo DQfile_array - DQ; , print_r($file_array); , echo DQDQ; , echo DQDQ; , echo DQunique_arrayput - DQ; , print_r($unique_array); , , //create the file for comparison (append) , $fp_a = fopen($email_address_file_name, a); , foreach ($unique_array as $value) { , if ($value!==) fwrite($fp_a, $value.DQ\nDQ); //remove empty lines , } , fclose($fp_a); , $str=DQDQ; , //create the file to email (write) , $fp_w = fopen($email_addresses_to_send_file_name, w); , foreach ($unique_array as $value) { , if ($value!==) fwrite($fp_w, $value.DQ\nDQ); //remove empty lines , if ($value!==) $message .= $value.DQ\nDQ; //remove empty lines , } , fclose($fp_w); , , if (filesize($email_addresses_to_send_file_name) > 1) , { , $email_header = , DQ , To: pete.olson@outlook.com , Subject: sendmail test two , From: peteolson3150@gmail.com , DQ; , $to = pete.olson@outlook.com; , $subject = Mail Chimp Addresses; , $headers = From: peteolson@gmail.com; , , mail($to, $subject, $message, $headers); , echo DQSomebody got mail!DQ; , , } , else , { , echo DQNo mail sentDQ; , } , ,