Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2005
    Thanked 0 Times in 0 Posts

    Warning: mail() expects... Error

    Hi there
    I got this error trying to set up a form... Does the mail() option only allow for 5 parameters to be sent?

    PHP Code:
    Warningmail() expects at most 5 parameters9 given 

  2. #2
    New Coder
    Join Date
    Mar 2006
    São Paulo, Brazil
    Thanked 0 Times in 0 Posts
    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:

    PHP Code:
    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! =)
    As coisas mais simples são as mais importantes.
    Thompson M1A1: D-Day


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts