views:

421

answers:

2

Hi All,

I've successfully written script that connects to my mail server and retrieves the headers and bodies of all new messages. I want to take it one step further to detect if attachment exists (images only), if so, download to server.

How to go about this using PHP & IMAP?

Thanks in advance

A: 

Attachments would be MIME encoded - it's fairly simple to parse and check the contents.

Images would have an image MIME content type.

Ofir
ok so then what, if i detect the MIME content type....what then?
st4ck0v3rfl0w
A: 

It's a little old but this article explains how to do it.

Ed