I just would like to say that some hosting do not authorize the next function due to some spam...
When we make a website, we often would like to receive mail, not spam of course (we'll see later how to block some spam).
A quite simple function permit you to sending mail where you want :
PHP Code:
<?php mail($to, $subject, $message); ?>
Really simple isn't it ?
You can also had some header :
PHP Code:
<?php
$to = 'myname@example.com';
$subject = 'my subject';
$message = 'Hello Word';
$headers = 'From: myname@example.com' . "\r\n" .
'Reply-To: myname@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
/* Do not forget the \r\n after each line in the header*/
mail($to, $subject, $message, $headers);
?>
That all !