- Timestamp:
- 05/29/12 14:59:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.1-2/expressoMail1_2/inc/class.imap_functions.inc.php
r6259 r6342 5289 5289 { 5290 5290 $matches = array(); 5291 preg_match_all("/src=[\'|\"]+data:([^ ;]*)(.*);base64,([a-zA-Z0-9\+\/\=]+)[\'|\"]+/i", $body, $matches, PREG_SET_ORDER); //Resgata imagens em rfc23975291 preg_match_all("/src=[\'|\"]+data:([^,]*);base64,([a-zA-Z0-9\+\/\=]+)[\'|\"]+/i", $body, $matches, PREG_SET_ORDER); //Resgata imagens em rfc2397 5292 5292 5293 5293 foreach ($matches as $i => &$v) 5294 5294 { 5295 $mailService->addStringImage(base64_decode($v[3]), $v[1] , 'EmbeddedImage'.$i.'.'.$this->mimeToExtension($v[1])); 5296 $body = str_replace($v[0], 'src="EmbeddedImage'.$i.'.'.$this->mimeToExtension($v[1]).'"' , $body); 5295 $ext = explode(';', $v[1]); //quebra todos os parametros em um array. 5296 $mailService->addStringImage(base64_decode($v[2]), $ext[0] , 'EmbeddedImage'.$i.'.'.$this->mimeToExtension($v[1])); 5297 $body = str_replace($v[0], 'src="EmbeddedImage'.$i.'.'.$this->mimeToExtension($ext[0]).'"' , $body); 5297 5298 } 5298 5299 }
Note: See TracChangeset
for help on using the changeset viewer.