How can i get a php contact form to send a welcome email?

hi guys,

i have a basic php contact form that works absolutely fine.

is it possible that when the site visitor fills in the form they get an automated welcome email?

below is the code i have already…


<?php

$to = "me@myemail.com";
$subject = "MAILING LIST SIGN UP";

$email=$_POST['email'] . "
";

$message = $headers;
$message .= "Name: " . $_POST["name"] . "
";
$message .= "E-mail: " . $_POST["email"] . "
";

$url = stripslashes($_POST["url"]);
if (!empty($url)) {
header( 'Location: http://www.goaway.com' );
exit();
} 

mail($to, $subject, $message, $headers);

header( 'Location: http://www.mydomain.com/thanks.php' ) ;
?>

thank you very much and i hope to hear from you.

sm