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

Bug #3353 Images not showing in HTML mail but as attachments
Submitted: 2005-02-02 00:42 UTC
From: nonick at 8027 dot org Assigned: cipri
Status: No Feedback Package: Mail_Mime
PHP Version: 4.3.8 OS: SuSE Linux 9.2 (64bit)
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 : 14 - 10 = ?

 
 [2005-02-02 00:42 UTC] nonick at 8027 dot org
Description: ------------ Hi, This seems a dup of #1436 but I think it is not. I've searched the net for hours to no avail. The simplest of examples won't work for me and it seems to me that there is some sort of bug, since they don't work at my ISP's hosts neither. My problem is: when composing an html with embedded images email, the images get attached but they are not shown in the html. This happens on KMail, Outlook and Evolution. The content-id seems well written in the raw email. As well as everything else, as a matter of fact. Cheers, ________ Miguel. Reproduce code: --------------- $mail = new Mail_mime("\n"); $mail->setHTMLBody('<html><body><img src="test.jpg" /> <p>There should be an image over this.</p></body></html>'); $mail->addHTMLImage('test.jpg', 'image/jpeg'); $send =& Mail::factory('mail'); $body = $mail->get(); $hdrs = $mail->headers(array('From' => foo@localhost', 'Subject' => 'test')); $send->send('me@localhost', $hdrs, $body); Expected result: ---------------- To see the image embedded into the HTML. Actual result: -------------- The image goes as an attachment and is not shown in the message body: To: me@localhost Subject: test MIME-Version: 1.0 From: foo@localhost Content-Type: multipart/related; boundary="=_cc8df59df26a6bae70721d2a05495eb7" Date: Wed, 02 Feb 2005 01:05:07 +0100 X-MailScanner-Information: blabla X-MailScanner: Not scanned: blabla --=_cc8df59df26a6bae70721d2a05495eb7 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable <html> <body><img src="/cid:43173d6c75b17bc0d0b3af67e7677b04" /> <p>There should be an image over this.</p> </body </html> --=_cc8df59df26a6bae70721d2a05495eb7 Content-Type: image/jpeg Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="test.jpg" Content-ID: <43173d6c75b17bc0d0b3af67e7677b04> [blablabla]

Comments

 [2005-02-04 12:05 UTC] cipri
What version of Mail and Mail_MIME are you using? I've copied your code, and it works great for me. One thing did struck me as odd in someting you pasted: The HTML code in your mail has this: src="/cid:43173d6c75b17bc0d0b3af67e7677b04" Can you confirm that there is a / in the beginning of the line? This happens when you HTML code contains src="/test.jpg". The test.jpg gets replaced, the / stays in place and the mail's unreadable. If your input has a / there aswell, remove it and try again?
 [2005-02-06 22:32 UTC] nonick at 8027 dot org
Hi, there was indeed a leading slash, but even removing that didn't solve the problem, so I tried with another class, phpmailer. It worked and the only difference I found between its output and mail_mime's was a line after the mime-encoding, Content-Type: multipart/related; type="text/html"; <---- here boundary="blabla" I don't know if that can be all there is to it. As to the versions, both are the latest. _________ Miguel.
 [2005-02-06 23:05 UTC] cipri
Could you run the exact ode from the "Reproduce Code" section, and post the headers and body of the mail again? THe problem doesn't show up in that code, but it seems it does in the code you're running in the environment where you found this bug.
 [2005-02-17 23:17 UTC] sean
Cipri asked for feedback >10 days ago. Making status "feedback". S
 [2005-03-05 05:09 UTC] sean
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.