PHP mail function has two implementations:
bool mail ( string $to , string $subject , string $message )
bool mail ( string $to , string $subject , string $message , string $headers)
There is also room for additional parameters:
specifications here: http://php.net/manual/en/function.mail.php
RETURN:
returns true is the email appears to be valid. (If you send something to address@blah.com, it appears to be valid so this function would return true even though the mail won't be delivered)
<?php
$to = "address@blah.com";
$subject = "Email sent from PHP";
$message = "Hi there!";
$headers = "From: someone@example.com";
mail($to, $subject, $message, $headers);
?>
No comments:
Post a Comment