/*
--------------------------------------------------------------
|MD Send to Friend 1.2 |
|(c)Matthew Dingley 2002 |
|For more scripts or assistance go to Cube Web at: |
|http://members.lycos.co.uk/matthewdingley/ |
|or view the readme |
|You may use this program only if the copyright remains |
|intact. If it is not, it is a breach of your use of this |
|program. |
|You are free to use this program on a non commercial site. |
|To use this program on a commercial site, you need a licence|
|Go to my website for more details |
--------------------------------------------------------------
*/
// Récupération depis les tableaux super-globaux
$email = $_POST['email'];
$name = $_POST['name'];
$sendname = $_POST['sendname'];
$sendemail = $_POST['sendemail'];
$message = $_POST['message'];
$embordercolor = "#ff0000"; //The color of the highlight around forgotten fields
$siteaddress = "www.terratettofiorentino.com"; //The address in the email sent
if($email&&$name&&$sendname&&$sendemail) {
//You can change the next variable if you know what you're doing.
$body = "vous avez reçu un message de $name ($email). $name a trouvé un site fantastique sur la Toscane et sur Castiglion Fiorentino ! Vous pouvez y accéder à partir de $siteaddress.\n\n\n
$name a ajouté un petit mot à votre intention :\n$message";
$thesubject = "Vous avez un message de $name";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: " . trim($name);
if(mail($sendemail, $thesubject, $body, $headers)) {
echo "
Un mail a été envoyé avec succès à $sendname ($sendemail).";
}
else {
new_encadre('Erreur...',"
Désolé, $name, votre mail n'a pas pu être envoyé. Veuillez réessayer.