Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $destinatario = "eugenio.distasio@gmail.com";
- $sender = trim(strip_tags($_POST['name']));
- $mail = trim(strip_tags($_POST['email']));
- $message = trim(strip_tags($_POST['message']));
- $a=array();
- $a["s"]=$sender;
- $a["m"]=$mail;
- $a["mm"]=$message;
- file_put_contents("CIAO.TXT", serialize($a));
- if($mail=="")
- {
- print "Ops... inserisci la tua email";
- die();
- }
- if($message=="")
- {
- print "Ops... inserisci un messaggio";
- die();
- }
- $headers = "From: %s
- Reply-To: %s
- MIME-Version: 1.0
- Content-type: text/html; charset=utf-8
- X-Mailer: PHP/" . phpversion();
- $template = "Nome: %s
- Email: %s
- Messaggio:
- %s";
- $subject = "Contatto dal sito CASA VACANZE MARIA";
- print (mail($destinatario, $subject, sprintf($template, $sender, $mail, $message), sprintf($header, $mail, $mail))) ? "Email inviata" : "Errore riprova";
- //mail("eugenio.distasio@gmail.com", $subject, sprintf($template, $sender, $mail, $message), sprintf($header, $mail, $mail));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement