View Full Version : Warning: mail() expects... Error

12-28-2006, 04:37 PM
Hi there
I got this error trying to set up a form... Does the mail() option only allow for 5 parameters to be sent?

Warning: mail() expects at most 5 parameters, 9 given

12-28-2006, 05:24 PM
As described in php.net, here's the function mail() sintax:

bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] )

So, it can have only 5 parameters. What you're trying to send to the mail() function? Some parameters that you would like to send is actually an array of them... like the example given in the site:

mail("nobody@example.com", "the subject", $message,
"From: webmaster@{$_SERVER['SERVER_NAME']}\r\n" .
"Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n" .
"X-Mailer: PHP/" . phpversion());

Maybe you're trying to send some headers like parameters. You should review the sintax of your mail() function.

Hope this help you! =)