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  


 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-02-17 23:17 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-03-05 05:09 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!