How many paramenter pass in mail function php
The mail()
function in PHP takes 3-5 parameters, depending on the version of PHP you're using. Here's a breakdown:
PHP 5.x and earlier:
mail($to, $subject, $message, $headers)
$to
: The recipient's email address.$subject
: The subject of the email.$message
: The body of the email.$headers
: An optional string containing additional headers (e.g., "From:", "Reply-To:", etc.).
PHP 6.x and later:
mail($to, $subject, $message, $headers, $additional_headers)
$to
: The recipient's email address.$subject
: The subject of the email.$message
: The body of the email.$headers
: An optional string containing additional headers (e.g., "From:", "Reply-To:", etc.).$additional_headers
: An optional string containing additional headers (e.g., "CC:", "BCC:", etc.).
So, in summary, the mail()
function in PHP can take 3 or 5 parameters, depending on the version of PHP you're using.