Location: PHPKode > scripts > Php AddressBook 2 > php-addressbook-2/sendmail.php
<?php
/*
*****************
fusion mail
version 1.0
fusionphp.com
*****************
*/
//variables (change these)

// The name you want to use to distinguish form other e-mails.
$yourname = "Lorna Bennett";

$thankyou = "index.php";
// thank you page

# set date
$thedate = date("Y-m-d");

if($email == ""){
?>
No email address added. Please go back.<br/>
<?php
}elseif($fname == ""){
?>
No name added. Please go back.<br/>
<?php
}elseif($message == ""){
?>
No message added. Please go back.<br/>
<?php
}else{

$Bmessage = "From: $yourmail\n\nFirst Name: $fname\nLast Name: $lname\nCompany Name: $company\n\nDate: $thedate\nMessage: $message";

$msg = ereg_replace("\\\'", "'", $Bmessage);
$msg = ereg_replace('\\\"', "\"", $msg);
$message1 = "from: $yourfirst\nemail: $email\nmessage: $msg";

mail($email, $subject, $msg, "From: $yourmail\r\nReply-to: $yourmail\r\n");

echo "Message Sent";

}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="text" name="subject" id="subject" value='' tabindex="1"/><br>

  <textarea name="message" cols="55" rows="10"></textarea>
 
<input name="submit" type="submit" value="send">
</form> 
Return current item: Php AddressBook 2