Public feed #600640

Stuff

public text v1 · immutable
Raw Edit
·published 2007-07-03 00:27 UTC
rendered paste body
<?php
$name=$_POST['name'];
$customer_mail=$_POST['customer_mail'];
$headers="From: $name, <$customer_mail>" . "\r\n";
$mail_from="$customer_mail";
$to ='admin@bnutts.com';
$subject ='NewsLetter Signup';

if(mail($to,"$subject",$headers,"From: $mail_from\n")){
echo "Thank you for joining our mailing list.";
$fp = fopen("email.txt", "a+");
fwrite($fp, $customer_mail);
fclose($fp);
}
else {
echo "ERROR";
}
?>