Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Location
    Russia
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    working with mail (imap)

    Hi all!

    Does anybody know, how to find a full documentation about how to handle mail attachements with imap? I could find only this article: http://www.linuxscope.net/articles/m...hmentsPHP.html

    But it doesn't work allways. Here is the message example: http://new1.flyupload.com/files/view...CWqA8Sghs5meYi Not all pictures are diccovered by the script.

    So, does anybody know, where to find more information about mail attachments?

  • #2
    Banned
    Join Date
    Jun 2007
    Location
    Web Designer
    Posts
    321
    Thanks
    0
    Thanked 6 Times in 6 Posts

  • #3
    New to the CF scene
    Join Date
    Oct 2009
    Location
    Russia
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thank's very much)

    I've started to study this problem by making print_r() of $structure->parts. It's really amazing, how it is built. I'm having a great deal of fun.

    This link: http://www.linuxscope.net/articles/m...hmentsPHP.html doesn't work for "Content-Type: multipart/mixed;" messages.

    The point is, u should find in $structure->parts all objects with two atributes, like this:

    [0] => stdClass Object
    (
    [attribute] => name
    [value] => image002.jpg
    )
    If such object is found, we have a file attachment and we know the name of the file. But u should do it very carefull, 'cause $structure->parts consists of many different objects and arrays.


    Right now I am wondering, how to parse it's body, I'll write here later.

    Added 5 minutes later: And here (http://ru.php.net/manual/en/function...body.php#82766) I found how to fetch it's body. Thank's a lot.
    Last edited by GreenMouse; 10-14-2009 at 01:47 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •