monderazarnino / php-mime-mail-parser

Automatically exported from code.google.com/p/php-mime-mail-parser
0 stars 0 forks source link

Missing getAttachmentsAsStreams #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. try running your example2.php on the any version later than r7.

What is the expected output? What do you see instead?
The code appears to be missing that handles attachments by stream, so I
have no idea what its supposed to do.

What version of the product are you using? On what operating system?
The latest version (r11) on RedHat Linux.

Original issue reported on code.google.com by fyrem...@gmail.com on 6 Nov 2009 at 1:55

GoogleCodeExporter commented 8 years ago
After r7 attachments are handled internally as streams. Thus you do not need to 
retrieve streams. Just use: 

$attachments = $Parser->getAttachments();

An example of how to read attachments is on the main page: 
http://code.google.com/p/php-mime-mail-parser/

Original comment by buca...@gmail.com on 7 Nov 2009 at 5:42

GoogleCodeExporter commented 8 years ago
May I suggest that example2 be changed to match this, as anyone who downloads 
the svn
to get the source gets a working example and a broken example.

Original comment by fyrem...@gmail.com on 7 Nov 2009 at 8:46

GoogleCodeExporter commented 8 years ago
Indeed, good idea. example2.php currently (r21) outputs this error when run :

PHP Fatal error:  Call to undefined method 
MimeMailParser::getAttachmentsAsStreams() in 
/path/to/php-mime-mail-parser/examples/example2.php on line 19

I'll fix it and commit

Original comment by gene.wood.temp on 22 Oct 2010 at 4:32

GoogleCodeExporter commented 8 years ago
This has been fixed in r22
Thanks for identifying the problem fyremoon

Original comment by gene.wood.temp on 22 Oct 2010 at 4:37