Login   Register  
PHP Classes
elePHPant
Icontem

how I can save the message in another path

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  >  how I can save the message in another path  >  (Un) Subscribe thread alerts  
Subject: how I can save the message in another path
Summary:how I can save the message in another path
Messages:3
Author:Silvia
Date:2013-04-15 11:17:47
Update:2013-04-15 12:43:40
 

  1. how I can save the message in another path   Reply  
Picture of Silvia
Silvia
2013-04-15 11:17:47
Thank you for the classes

you can save the original file in another path.

I tried
$message_file='pop3://'.$connection_name.'/'.$message;
$copiar = copy($message_file, '../../repository/acuses/' . $message);

but fails
Warning: copy() [function.copy]: pop3_stream::url_stat is not implemented!

Warning: copy(pop3://0/10) [function.copy]: failed to open stream: "pop3_stream::stream_open" call failed

I need to keep the receipt, and legal issue is not valid if fopen ($ message_file, "r") and save it to another file, or copy the original need. If you can only with fopen, which is the extension of the email?

Thank you

  2. Re: how I can save the message in another path   Reply  
Picture of Manuel Lemos
Manuel Lemos
2013-04-15 12:24:18 - In reply to message 1 from Silvia
It seems copy is trying to read the file permissions which does not make sense because the message is not a file in a file system.

You can try to use file_get_contents to read the message and file_put_contents to store it in some file you want.

The message is not a file, so it does not have real file name. It does not matter. You just pick a file name that suits your needs. It does not need to have a file name extension. You can use .eml but it should not matter.

  3. Re: how I can save the message in another path   Reply  
Picture of Silvia
Silvia
2013-04-15 12:43:40 - In reply to message 2 from Manuel Lemos
Thank you