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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: message at ptd dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 11:01:30 2024 UTC