Jump to content


Photo

Partnumber of a RELATED Image in an MIME Email by Content-ID


  • Please log in to reply
1 reply to this topic

#1 xony

xony
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 September 2006 - 03:14 PM

Hello,

I need help with my Email Client and the IMAP Functions for my Bachelor Report.

Today I wanted to extract the inline Image of an Email to display it in the Browser.

I tried the function imap_fetchstructure();
But then I noticed that

Content-ID: <Picture_Id>

is not parsed by that function.

In the HTML code <img src="cid:Picture_Id" alt="" /> I want to get the cid:.
Than parse the array and retrieve the right part number for getting the file content.

Is there somebody who can give me some advice to get a function like this:

function getPartByContentId($connection, $msg_no, $cid){
...
return $part_no; //Example: 1.2.2
}

Thanks

The part looks like this:

--------------040403090002030709060703
Content-Type: image/jpeg;
name="cv.jpg"
Content-Transfer-Encoding: base64
Content-ID: <Picture_ID>
Content-Disposition: inline;
filename="cv.jpg"

/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAPAAA/+4ADkFkb2JlAGTAAAAA
--------------040403090002030709060703--


#2 xony

xony
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 September 2006 - 04:28 PM

I found the solution!
Watch the source code and you will find the content_id.  ;D

because of the brackets in <content_id> the id didn't show up in the browser and was not printed.

But thanks for reading this post.  ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users