Login   Register  
PHP Classes
elePHPant
Icontem

Attachments

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

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

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

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.

Regards,
Raj

  2. Re: Attachments   Reply   Report abuse  
Picture of Manuel Lemos
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.

http://www.phpclasses.org/mimeparser

  3. Re: Attachments   Reply   Report abuse  
Picture of Vernon Wenberg III
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  
Picture of Manuel Lemos
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.