php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57585 function to mime-encode provided string
Submitted: 2007-03-21 05:27 UTC Modified: 2013-05-06 15:50 UTC
From: uhlar at fantomas dot sk Assigned:
Status: Not a bug Package: mailparse (PECL)
PHP Version: 4.4.4 OS: all
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: uhlar at fantomas dot sk
New email:
PHP Version: OS:

 

 [2007-03-21 05:27 UTC] uhlar at fantomas dot sk
Description:
------------
Hello, it would be nice to provide a simple function that would return mime-encoded string from provided string, charset and encoding.
There are many PHP scripts which already do their job, but they send mails with invalid MIME headers, and rewriting them to create mail using interface of this package would be too much work.
Providing simple function to encode provided string would help  coders very much to make their mail RFC compliant and not tagged as spam due to invalid header encoding.
The function could look like

mailparse_mime_encode(string[, encoding[, charset]])

where encoding would be auto (smallest result) quoted-printable or base64, and charset could be detected from current locale settings.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-15 17:38 UTC] eflash at gmx dot net
Hi, let me ask why do you think that such a function should go into this package? Isnt it just to parse mails, and not to compose and send? F.e. the imap extension has a function imap_8bit() for that, and if you use PHP's internal mail function then you should ask for a PHP enhancement.
I was also these days in need for such a function, and found some suggestions on the PHP manual pages; but since they all didnt fully fit for what I needed, I wrote a new extension;
take a look here:
http://www.gknw.net/phpbb/viewtopic.php?t=462
maybe this can help you already, and is what you want?
Anyway, I think such a function should go into main PHP, and if you agree with that then close this here, and add an enhancement request for PHP, and CC me so I can add my 2ct to it since I too would love to see such a function with PHP itself.

greets, G?nter.
 [2008-11-15 09:43 UTC] klimpong at gmail dot com
I agree with the previous comment, this package parse mail and parsing email is complicated enough. ;-) This "bug" could be bogus'd or WONTFIX'd.
 [2013-05-06 15:50 UTC] remi@php.net
-Status: Open +Status: Not a bug
 [2013-05-06 15:50 UTC] remi@php.net
Old enough, and answered.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 02:01:29 2024 UTC