ID:               41091
 Updated by:       [EMAIL PROTECTED]
 Reported By:      justinbrinkerhoff at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: Ubuntu 6.10 Edgy Eft
 PHP Version:      4.4.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

You don't need any extra parameters, you either change what is passed
into the message parameter or into the additional_headers parameter as
appropriate.


Previous Comments:
------------------------------------------------------------------------

[2007-04-15 02:58:20] justinbrinkerhoff at gmail dot com

Description:
------------
Hi, I ran accross something while writing an e-mail contact form for a
customer. I have hosting provider still on PHP 4.3.2. I am changing
providers soon though. But anyways, what I noticed is the mail()
function only allows 5 arguments. 

So, what I wanted to ask/propose, is to see if perhaps I can
suggest/request there be 7 - 10 arguments allowable in the mail()
function. Five seems a bit limited, and I think a max of 10 would be
reasonable. Beyond 10 would probably be a little rediculous, but 10
should suffice. 

I don't see this as necessarily a "bug" per say, but a feature that
would make it a lot easier. 

Here is an example of the problem at hand.

Reproduce code:
---------------
//HTML Form Code - ContactUs.html
<form name="email" method="post" action="mail.php">
Name <input type="text" name="name" id="name" />
Address <input type="text" name="addr" id="addr" />
E-Mail <input type="text" name="from" id="from" />
Message <textarea rows="10" cols="20" name="notes"
id="notes"></textarea>
<input type="submit" value="SEND" />
</form>

//PHP Code - mail.php
<?php
$date = date(r);
$to = "[EMAIL PROTECTED]";
$from = $_POST['from'];
$subject = "Example.com Support Inquiry - From Website";
$message = $_POST['notes'];
$address = $_POST['addr'];
if(mail($to, $date, $from, $subject, $message, $address)) {
echo "Message Sent";
} else {
echo "Message Failed";
}
?>

Expected result:
----------------
Page should say:

Message Sent

Actual result:
--------------
Warning: mail() expects at most 5 parameters, 6 given in
/var/www/html/mail.php on line 8
Message Failed


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


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

Reply via email to