php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58545 Please allow a string as input for mailparse_uudecode_all
Submitted: 2009-02-09 12:50 UTC Modified: 2021-09-08 15:06 UTC
From: message at ptd dot net Assigned: cmb (profile)
Status: Wont fix Package: mailparse (PECL)
PHP Version: 5.2.0 OS: RHEL4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-02-09 12:50 UTC] message at ptd dot net
Description:
------------
This extension supposed to be efficient. How come we cannot pass an already existing string to mailparse_uudecode_all() and instead required to pass a file resource?

If I already store the contents of an email message as a string $strRawMessage, I am then required to go through these unnecessary steps:

$fp = tmpfile();
fwrite($fp, $strRawMessage);

$arrData = mailparse_uudecode_all($fp); 
		
fclose($fp);

This is very inefficient.

Please allow us to pass a string instead of file resource.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-16 19:04 UTC] shire@php.net
this function accepts any stream type, so have you considered using something like php://memory or php://temp options so you don't go to disk? see: http://us.php.net/manual/en/wrappers.php.php. 

I believe the original intent here was probably to work on file sizes that exceeded the available memory, hence making streams the more efficient choice for processing.
 [2021-09-08 15:06 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-09-08 15:06 UTC] cmb@php.net
Given that there was no further feedback for more than ten years,
that the mailparse extension is barely maintained, and that it is
indeed possible to use a stream wrapper (besides php://memory,
data:// may also be an option), I'm closing this request as
WONTFIX.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 15:01:29 2024 UTC