//mail.php
//Read the content of the letter
$filename = "wellcom.txt";
$fd = fopen( $filename, "r" );
$contents = fread($fd, filesize($filename));
fclose( $fd );
//Replace the corresponding content
$contents=eregi_replace("
$contents=eregi_replace("
$contents=eregi_replace("
//Send an email
$to_email=$email;
$from_email="php-java@21cn.com";
$subject="Wellcom!";
$header_info="From:$from_emailnReply-To:$from_email";
$result=@mail($to_email,$subject,$contents,$header_info);
if($result) {
echo "Send message successfully!";
} else {
echo "Send message failed!";
}
?>
//wellcom.txt content;
Your registration information is:
Username:
Password:
Welcome!
Welcome to: