//$arr_valid_attachtypes,$arr_valid_attachext $arr_valid_attachtypes = explode(",", $atype); $arr_valid_attachext = explode(",", $atype_extension); $atype = ""; /* echo("valid types:"); print_r($arr_valid_attachtypes); echo("<br>valid exts:"); print_r($arr_valid_attachext); echo("<br>"); */ /* $fl = fopen("attachments/mail1.txt","w+"); fwrite($fl, $var_fromaddress); fclose($fl); */ if (validateFromAddress($var_fromaddress, $arr_lookupvalues['var_post2postgap']) == false) { //echo("false"); exit; } //exit(); //get all the destined addresses from to,cc,bcc into the array $var_toaddress //do check for duplicates and insert all valid addresses to $var_toaddress array $var_toaddress = array(); for ($j = 0; $j < 3; $j++) { $structure = ""; switch ($j) { case 0: $structure = Mail_RFC822::parseAddressList($mimedecoder->_mailheader->_headerto, 'example.com', true); break; case 1: $structure = Mail_RFC822::parseAddressList($mimedecoder->_mailheader->_headercc, 'example.com', true);
$result = executeSelect($sql, $conn); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result)) { $var_attach_typearr = explode("|", $row["vLookUpValue"]); $atype = $atype . strtolower($var_attach_typearr[1]) . ","; $atype_extension = $atype_extension . strtolower($var_attach_typearr[0]) . ","; } } mysql_free_result($result); $atype = substr($atype, 0, -1); $atype_extension = substr($atype_extension, 0, -1); //$arr_valid_attachtypes,$arr_valid_attachext $arr_valid_attachtypes = explode(",", $atype); $arr_valid_attachext = explode(",", $atype_extension); $atype = ""; if (validateFromAddress($var_fromaddress, '0') == false) { return; } //get all the destined addresses from to,cc,bcc into the array $var_toaddress //do check for duplicates and insert all valid addresses to $var_toaddress array $var_toaddress = array(); for ($j = 0; $j < 3; $j++) { $structure = ""; switch ($j) { case 0: $structure = Mail_RFC822::parseAddressList($mimedecoder->_mailheader->_headerto, 'example.com', true); break; case 1: $structure = Mail_RFC822::parseAddressList($mimedecoder->_mailheader->_headercc, 'example.com', true); break; case 2: