Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2006, 12:28 AM
Registered User
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to dr_huda
Default show html email with images

I made experiment by sending html email using Microsoft Outlook with an image embed in it (not as an attachment), and used imap functions to retrieve the email from the mailserver and displayed it on the browser. After days of learning how to read the structure and find the html part of multipart email to be displayed, I found out codes I don't understand in the html part:

1. There are two characters ('3D') scattered all over the html code. I don't know what this means, but after I removed them with str_replace() function, it doesn't matter. But if somebody can explain what is this and why this happens, I need those helps

2. I can't display the image embed on the html code. After I read the <img> tag, I found out another question. The tag displayed : <img height="100" width="100" src="cid:image01.gif@[codes I don't understand]">. Is somebody knows what happen to the 'src' attribute? And does it only happen if your retrieve html email from Outlook Express?
Thanks for your helps
 
Old April 9th, 2006, 01:07 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> There are two characters ('3D') scattered all over the html code.
> I don't know what this means

The is an encoding used on the message, quoted-printable, specifically. This isn't just some random characters inserted into the message.

http://www.php.net/quoted_printable_decode
http://www.php.net/imap_qprint

> I can't display the image embed on the html code. After I read the <img> tag, I
> found out another question. The tag displayed : <img height="100" width="100"
> src="cid:image01.gif@[codes I don't understand]">. Is somebody knows what happen
> to the 'src' attribute? And does it only happen if your retrieve html email from
> Outlook Express?

The cid is a pointer that refers to the inline attachment where the embedded file is located. If you look at the MIME source of the message you'll find that CID in the headers for the image attachment.

MIME mail is very complicated, I suggest you use a prebuilt library for this, unless you are interested in getting to know MIME for academic reasons. One such library is a package I wrote for PEAR called Mail_IMAP, http://pear.php.net/Mail_IMAP

HTH!

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show plain format from html hdpark BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 14 November 26th, 2008 05:31 PM
Thumbnail images do not show up svgiles BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 2 September 2nd, 2008 01:00 PM
how I can show and upload a images Alexds ASP.NET 1.x and 2.0 Application Design 2 May 19th, 2005 04:14 PM
Stored Procedure to show Images desireemm SQL Server 2000 0 April 25th, 2005 06:03 PM
Show Images from Database morpheus Classic ASP Basics 12 December 16th, 2003 04:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.