2733 | | $toaddress = $params['input_to']; |
2734 | | $ccaddress = $params['input_cc']; |
2735 | | $subject = $params['input_subject']; |
2736 | | $msg_uid = $params['msg_id']; |
2737 | | $body = $params['body']; |
2738 | | $body = str_replace("%nbsp;"," ",$params['body']); |
| 2732 | $toaddress = $params['input_to']; |
| 2733 | $ccaddress = $params['input_cc']; |
| 2734 | $subject = $params['input_subject']; |
| 2735 | $msg_uid = $params['msg_id']; |
| 2736 | $body = $params['body']; |
| 2737 | $body = str_replace("%nbsp;"," ",$body); |
2776 | | //Build Forwarding Attachments!!! |
2777 | | if (count($forwarding_attachments) > 0) |
2778 | | { |
2779 | | foreach($forwarding_attachments as $forwarding_attachment) |
2780 | | { |
2781 | | $file_description = unserialize(rawurldecode($forwarding_attachment)); |
2782 | | $tmp = array_values($file_description); |
2783 | | foreach($file_description as $i => $descriptor){ |
2784 | | $tmp[$i] = eregi_replace('\'*\'','',$descriptor); |
2785 | | } |
2786 | | $file_description = $tmp; |
2787 | | |
2788 | | $fileContent = $this->get_forwarding_attachment($file_description[0], $file_description[1], $file_description[3],$file_description[4]); |
2789 | | $fileName = $file_description[2]; |
2790 | | |
2791 | | $file_description[5] = strlen($fileContent); //Size of file |
2792 | | $return_forward[] = $file_description; |
| 2775 | //Build Forwarding Attachments!!! |
| 2776 | foreach($forwarding_attachments as $forwarding_attachment) |
| 2777 | { |
| 2778 | $file_description = unserialize(rawurldecode($forwarding_attachment)); |
2794 | | $mail->AddStringAttachment($fileContent, $fileName, $file_description[4], $this->get_file_type($file_description[2])); |
2795 | | } |
| 2780 | $file_description = array_values($file_description); |
| 2781 | foreach($file_description as $i => $descriptor){ |
| 2782 | $file_description[$i] = eregi_replace('\'*\'','',$descriptor); |
| 2783 | } |
| 2784 | $fileContent = $this->get_forwarding_attachment($file_description[0], $file_description[1], $file_description[3],$file_description[4]); |
| 2785 | $fileName = $file_description[2]; |
| 2786 | |
| 2787 | $file_description[5] = strlen($fileContent); //Size of file |
| 2788 | $return_forward[] = $file_description; |
| 2789 | |
| 2790 | $mail->AddStringAttachment($fileContent, $fileName, $file_description[4], $this->get_file_type($file_description[2])); |
2812 | | // Do not corrupt animated gif |
2813 | | //case 1: $image_big = imagecreatefromgif($attach['tmp_name']);break; |
2814 | | case 2: $image_big = imagecreatefromjpeg($attach['tmp_name']); break; |
2815 | | case 3: $image_big = imagecreatefrompng($attach['tmp_name']); break; |
2816 | | case 6: |
2817 | | require_once("gd_functions.php"); |
2818 | | $image_big = imagecreatefrombmp($attach['tmp_name']); break; |
2819 | | default: |
2820 | | $mail->AddAttachment($attach['tmp_name'], $attach['name'], "base64", $this->get_file_type($attach['name'])); |
2821 | | break; |
| 2813 | // Do not corrupt animated gif |
| 2814 | //case 1: $image_big = imagecreatefromgif($attach['tmp_name']);break; |
| 2815 | case 2: |
| 2816 | $image_big = imagecreatefromjpeg($attach['tmp_name']); break; |
| 2817 | case 3: |
| 2818 | $image_big = imagecreatefrompng($attach['tmp_name']); break; |
| 2819 | case 6: |
| 2820 | require_once("gd_functions.php"); |
| 2821 | $image_big = imagecreatefrombmp($attach['tmp_name']); break; |
| 2822 | default: |
| 2823 | $mail->AddAttachment($attach['tmp_name'], $attach['name'], "base64", $this->get_file_type($attach['name'])); |
| 2824 | break; |
2871 | | if (is_array($return_files)) |
2872 | | foreach ($return_files as $index => $_attachment) { |
2873 | | if (array_key_exists("name",$_attachment)){ |
2874 | | unset($return_files[$index]); |
2875 | | $return_files[$index] = $_attachment['name']."_SIZE_".$return_files[$index][1] = $_attachment['size']; |
2876 | | } |
2877 | | else |
2878 | | { |
2879 | | unset($return_files[$index]); |
2880 | | $return_files[$index] = $_attachment[2]."_SIZE_". $return_files[$index][1] = $_attachment[5]; |
| 2877 | |
| 2878 | if (is_array($return_files)) |
| 2879 | { |
| 2880 | foreach ($return_files as $index => $_attachment) |
| 2881 | { |
| 2882 | if (array_key_exists("name", $_attachment)) |
| 2883 | { |
| 2884 | //unset($return_files[$index]); |
| 2885 | $return_files[$index] = $_attachment['name']."_SIZE_".$return_files[$index][1] = $_attachment['size']; |
| 2886 | } |
| 2887 | else |
| 2888 | { |
| 2889 | //unset($return_files[$index]); |
| 2890 | $return_files[$index] = $_attachment[2]."_SIZE_". $return_files[$index][1] = $_attachment[5]; |
| 2891 | } |