note 109704 added to function.imap-savebody
| From: | anon | Date: | Sun, 12 Aug 2012 01:59:03 +0000 |
| Subject: | note 109704 added to function.imap-savebody | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190039@lists.php.net to get a copy of this message | ||
By using imap_fetchbody() you may run in trouble by using too much memory. Using imap_savebody() may
prevent this.
But the content will be encoded, in other words it is useless. Adding a filter can help here.
$whandle = fopen('./incomming/tmp.tif','w');
stream_filter_append($whandle,
'convert.base64-decode',STREAM_FILTER_WRITE);
imap_savebody ($mbox, $whandle, $i, $partcounter++);
fclose($whandle);
NOTE: To find the proper filter you need to check the encoding given by the structure of the body.
----
Server IP: 69.147.83.197
Probable Submitter: 89.12.110.116
----
Manual Page -- http://www.php.net/manual/en/function.imap-savebody.php
Edit -- https://master.php.net/note/edit/109704
Del: integrated -- https://master.php.net/note/delete/109704/integrated
Del: useless -- https://master.php.net/note/delete/109704/useless
Del: bad code -- https://master.php.net/note/delete/109704/bad+code
Del: spam -- https://master.php.net/note/delete/109704/spam
Del: non-english -- https://master.php.net/note/delete/109704/non-english
Del: in docs -- https://master.php.net/note/delete/109704/in+docs
Del: other reasons-- https://master.php.net/note/delete/109704
Reject -- https://master.php.net/note/reject/109704
Search -- https://master.php.net/manage/user-notes.php