Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.12

Request #1436 Useing addHTMLImage (latest version)
Submitted: 2004-05-18 22:29 UTC
From: nykodym at email dot cz Assigned: cipri
Status: Bogus Package: Mail_Mime
PHP Version: 4.2.2 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 38 + 34 = ?

 
 [2004-05-18 22:29 UTC] nykodym at email dot cz
Description: ------------ How I can use addHTMLImage() to send HTML mail with images, but I don't want these images in attachment. I want them only in HTML mail. Thanks... Reproduce code: --------------- <? include('Mail.php'); include('Mail/mime.php'); $html = '<html><body>HTML version of email <img src="top1.jpg"> </body></html>'; $crlf = "\r\n"; $hdrs = array( 'From' => 'you@yourdomain.com', 'Subject' => 'Test mime message' ); $mime = new Mail_mime($crlf); $mime->setHTMLBody($html); $mime->addHTMLImage("_image_files/top1.jpg"); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); $mail->send('nykodym@email.cz', $hdrs, $body); ?> Expected result: ---------------- The HTML mail is recived to nykodym@email.cz adress. The mail displays image top1.jpg. But in attachement isn't image top1.jpg. Actual result: -------------- The HTML mail is recived to nykodym@email.cz adress. The mail displays image top1.jpg. But in attachement is image top1.jpg.

Comments

 [2005-01-22 23:55 UTC] cipri
Running the supplied code and viewing the mail with Outlook Express on WXPSP2, I only see a single image in the mail body. No attachment icon, and no second image below the body of the mail. What client are you using that does display the image again? It's most likely a bug in your mail-client program, since the MIME-strut of the received mail looks fine to me.
 [2005-02-06 15:23 UTC] cipri
Thank you for taking the time to write to us, but this is not a bug. This was most probably a mail-client issue.
 [2008-07-21 03:01 UTC] tudor (Tudor Holton)
The problem could also be that the name in the html message body needs to be *identical* to that passed in to addHTMLImage(). In your code, you have: Body:'top.jpg' addHTMLImage('_image_files/top1.jpg') At some point the Mail::mime code changed. Previously only the filename was required, whereas now the full path is required (as of 21-Jul-2008).