PHP Classes


Recommend this page to a friend!

      POP3 e-mail client  >  All threads  >  Attachments  >  (Un) Subscribe thread alerts  
Summary:How to get the attachments
Author:Raj Naidu
Date:2007-05-17 07:49:34
Update:2007-07-07 17:24:49

  1. Attachments   Reply   Report abuse  
Raj Naidu - 2007-05-17 07:49:34

Firstly, let me say thanks to you.

I am able to connect to my pop server and can retrieve messages.
but could you please tell me how to retrieve the attachment(s)(the attachent will be a csv file) and store the file in my server?

Please help me.


  2. Re: Attachments   Reply   Report abuse  
Manuel Lemos - 2007-05-17 08:08:50 - In reply to message 1 from Raj Naidu
Use this class in conjunction with the MIME parser class. Take a look at the test_message_decoder.php example script.

  3. Re: Attachments   Reply   Report abuse  
Vernon Wenberg III - 2007-07-07 08:22:41 - In reply to message 2 from Manuel Lemos
I've beaten my head all night about this. Do you think it'd be possible for you to make a simple example script that downloads all messages and extracts any attachments to a directory?

  4. Re: Attachments   Reply   Report abuse  
Manuel Lemos - 2007-07-07 17:24:49 - In reply to message 3 from Vernon Wenberg III
The MIME parser class does that. It saves all message body parts to separate files. Just use the SaveBody argument of the MIME parser class decode function to specify the path of the directory where the files are saved.