Class: ezcMailStorageSet

Implemented Interfaces

1. // create a new POP3 transport object and a mail parser object
2. $transport = new ezcMailPop3Transport( "server" );
3. $transport->authenticate( "username", "password" );
4. $parser = new ezcMailParser();
5.
6. // wrap around the set returned by fetchAll()
7. // and specify that the sources are to be saved in the folder /tmp/cache
8. $set = new ezcMailStorageSet( $transport->fetchAll(), '/tmp/cache' );
9.
10. // parse the storage set
11. $mail = $parser->parseMail( $set );
12.
13. // get the filenames of the saved mails in the set
14. // this must be saved somewhere so it can be used on a subsequent request
15. $files = $set->getSourceFiles();
16.
17. // get the source of a the 4th saved mail
18. // this can be on a subsequent request if the $files array was saved from
19. // a previous request
20. $source = file_get_contents( $files[3] );