include_once 'config.php'; /*$savefile = "savehere.txt"; $sf = fopen($savefile, 'a+') or die("can't open file");*/ ob_start(); // read from stdin $fd = fopen("files/ofuz_catch.log", "r"); $email = ""; while (!feof($fd)) { $email .= fread($fd, 1024); } fclose($fd); // handle email //$lines = explode("\n", $email); $OfuzEmailFetcher = new OfuzEmailFetcher(); $OfuzEmailFetcher->fetchEmailRow($email); $to = $OfuzEmailFetcher->getToEmail(); $from = $OfuzEmailFetcher->getFromEmail(); $bcc = $OfuzEmailFetcher->getBCCEmail(); $cc = $OfuzEmailFetcher->getCCEmail(); //$email_marged_array = array_merge($to,$bcc); $all_emails_merged = array_merge($to, $cc); //print_r($all_emails_merged);die(); if (is_array($all_emails_merged)) { foreach ($all_emails_merged as $email_add) { $display_array[] = $OfuzEmailFetcher->getEmailAddress($email_add); $email_array[] = $OfuzEmailFetcher->getEmailDisplay($email_add); } $len_to_emailarr = count($email_array); }
//fwrite($fp, "\n\n text/plain content:".$final_message_content); $email = $_POST['email']; $key = $_POST['key']; $secrate_string = "Ofuz is Open Source"; $date = date("YMDH"); $s_string = "{$secrate_string}" . "{$date}"; $secrate_key = MD5($s_string); //if($key === $secrate_key){ //echo $email;die(); $code_found = false; $addnote = false; $addtask = false; $addprojectnote = false; $add_project_task = false; $attachments_extracted = false; $OfuzEmailFetcher = new OfuzEmailFetcher(); $do_user = new User(); $do_contact = new Contact(); $do_contact_note = new ContactNotes(); $do_contact_email = new ContactEmail(); $do_project = new Project(); $do_project_discuss = new ProjectDiscuss(); //$do_project_task = new ProjectTask(); //$do_task = new Task(); $do_activity = new Activity(); // Take any one as per convinience //$OfuzEmailFetcher->fetchEmailText('/var/www/ofuz/files/ofuz_catch.log'); $OfuzEmailFetcher->fetchEmailRow($email); //$OfuzEmailFetcher->fetchEmailStream($stream); $to = $OfuzEmailFetcher->getToEmail(); $from = $OfuzEmailFetcher->getFromEmail();