Changeset 398
- Timestamp:
- 08/14/08 11:47:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r378 r398 1545 1545 1546 1546 // Build CID for embedded Images!!! 1547 $pattern = '/src="([^"]*?show_embedded_attach.php\?msg_folder=(.+)?& amp;msg_num=(.+)?&msg_part=(.+)?)"/isU';1547 $pattern = '/src="([^"]*?show_embedded_attach.php\?msg_folder=(.+)?&(amp;)?msg_num=(.+)?&(amp;)?msg_part=(.+)?)"/isU'; 1548 1548 $cid_imgs = ''; 1549 1549 $name_cid_files = array(); 1550 1550 preg_match_all($pattern,$mail->Body,$cid_imgs,PREG_PATTERN_ORDER); 1551 1551 $cid_array = array(); 1552 foreach($cid_imgs[ 4] as $j => $val){1553 if ( !array_key_exists($cid_imgs[ 3][$j].$val, $cid_array) )1552 foreach($cid_imgs[6] as $j => $val){ 1553 if ( !array_key_exists($cid_imgs[4][$j].$val, $cid_array) ) 1554 1554 { 1555 $cid_array[$cid_imgs[ 3][$j].$val] = base_convert(microtime(), 10, 36);1555 $cid_array[$cid_imgs[4][$j].$val] = base_convert(microtime(), 10, 36); 1556 1556 } 1557 $cid = $cid_array[$cid_imgs[ 3][$j].$val];1557 $cid = $cid_array[$cid_imgs[4][$j].$val]; 1558 1558 $mail->Body = str_replace($cid_imgs[1][$j], "cid:".$cid, $mail->Body); 1559 1559 1560 if ($msg_uid != $cid_imgs[ 3][$j]) // The image isn't in the same mail?1560 if ($msg_uid != $cid_imgs[4][$j]) // The image isn't in the same mail? 1561 1561 { 1562 $fileContent = $this->get_forwarding_attachment($cid_imgs[2][$j], $cid_imgs[3][$j], $cid_imgs[4][$j], 'base64'); 1562 $fileContent = $this->get_forwarding_attachment($cid_imgs[2][$j], $cid_imgs[4][$j], $cid_imgs[6][$j], 'base64'); 1563 //prototype: get_forwarding_attachment ( folder, msg number, part, encoding) 1563 1564 $fileName = "image_".($j).".jpg"; 1564 1565 $fileCode = "base64"; 1565 1566 $fileType = "image/jpg"; 1567 $file_attached[0] = $cid_imgs[2][$j]; 1568 $file_attached[1] = $cid_imgs[4][$j]; 1569 $file_attached[2] = $fileName; 1570 $file_attached[3] = $cid_imgs[6][$j]; 1571 $file_attached[4] = 'base64'; 1572 $file_attached[5] = strlen($fileContent); //Size of file 1573 $return_forward[] = $file_attached; 1566 1574 } 1567 1575 else 1568 1576 { 1569 $attach_img = $forwarding_attachments[$cid_imgs[ 4][$j]-2];1577 $attach_img = $forwarding_attachments[$cid_imgs[6][$j]-2]; 1570 1578 $file_description = unserialize(rawurldecode($attach_img)); 1571 1579 foreach($file_description as $i => $descriptor){ … … 1576 1584 $fileCode = $file_description[4]; 1577 1585 $fileType = $this->get_file_type($file_description[2]); 1578 unset($forwarding_attachments[$cid_imgs[ 4][$j]-2]);1586 unset($forwarding_attachments[$cid_imgs[6][$j]-2]); 1579 1587 if (!empty($file_description)) 1580 1588 {
Note: See TracChangeset
for help on using the changeset viewer.