Req #48826 [Opn->Sus]: Add attachment support to mail()

From: Date: Tue, 13 Mar 2018 21:45:29 +0000
Subject: Req #48826 [Opn->Sus]: Add attachment support to mail()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214343@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=48826&edit=1

 ID:                 48826
 Updated by:         cmb@php.net
 Reported by:        php at richardneill dot org
 Summary:            Add attachment support to mail()
-Status:             Open
+Status:             Suspended
 Type:               Feature/Change Request
 Package:            Mail related
 Operating System:   *
 PHP Version:        *
 Block user comment: N
 Private report:     N

 New Comment:

In my opinion, adding explicit multipart support to mail() is not
desirable, since there are already several existing userland
solutions.  So this feature request is controversial, and as such
would require the RFC process[1].  Anybody is welcome to start it!
For the time being, I'm suspending this ticket.

[1] <https://wiki.php.net/rfc/howto>


Previous Comments:
------------------------------------------------------------------------
[2011-03-17 18:10:51] anrdaemon at freemail dot ru

"Given the fact it is already overloaded", it is better to cleanup and shape the code for
a more robust and predictable functionality.
Not to bloat it unnecessarily.

------------------------------------------------------------------------
[2009-07-07 04:30:31] php at richardneill dot org

Description:
------------
It would be a really nice if mail() supported an extra parameter for 
attachments. Perhaps an array containing the filenames (and whose 
keys, if present, would be the name of the attachments).

(I know there are ways of doing this by installing pear classes, but 
that isn't always an option. And it's awkward to do it by hand).

Given that mail() is already rather overloaded, it might be worth 
adding another function, say mail_attach() to do it.



Reproduce code:
---------------
Current alternative:

$cmd = "echo '$BODY_TEXT'  | mutt -s '$SUBJECT' -a '$filename_1'
-a '$filename_2' '$email'";
exec ($cmd);

which is ugly, has external dependencies, only works on Linux, and will break in interesting ways if
shell-quoting isn't corrected.




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=48826&edit=1


Thread (3 messages)

« previous php.bugs (#214343) next »