Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 1st, 2006, 12:28 AM
Registered User
 
Join Date: Mar 2006
Location: Semarang, , Indonesia.
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
Reply With Quote
  #2 (permalink)  
Old April 9th, 2006, 01:07 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.