Jump to content

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


xony

Recommended Posts

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--
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.