2011-05-12 63 views
-1

以下腳本不會在電子郵件中嵌入圖像。通過defualt當點擊下載鏈接,下載圖像和顯示osCommerce在電子郵件中嵌入圖像

require('includes/application_top.php'); 
//include(DIR_WS_CLASSES . 'mail.php'); 
$img_url ='<div style="border:1px solid black; padding:5px;"><img src="http://spottheball.designers99.com/images/logo.png" /></div>'; 
$contents = $img_url; 

$contents .= '<div style="padding:4px; border:1px solid red; background:green;font-size:50px">A test text</div>'; 
$m = new email(array('X-Mailer: osCommerce Mailer')); 
$m->add_html($contents); 
$m->image_types = 'png'; 
//$m->headers[] = "Content-Type: image/png"; 
$m->build_message(); 
$add_to = '[email protected]'; 
$m->send('Shahid', $add_to, 'Omar', '[email protected]'); 

回答

0

的Gmail塊圖像:相反,它消除了img標籤的src屬性。所以我這樣做了,圖像得到了顯示。

相關問題