Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $to = '[email protected]'; // Put in your email address here
- $subject = "Nuevo mensaje desde Hotel Astor"; // The default subject. Will appear by default in all messages. Change this if you want.
- // User info (DO NOT EDIT!)
- $name = stripslashes($_REQUEST['name']); // sender's name
- $phone = stripslashes($_REQUEST['phone']); // sender's name
- $email = stripslashes($_REQUEST['email']); // sender's mail
- $message = stripslashes($_REQUEST['message']); // sender's mail
- // The message you will receive in your mailbox
- // Each parts are commented to help you understand what it does exaclty.
- // YOU DON'T NEED TO EDIT IT BELOW BUT IF YOU DO, DO IT WITH CAUTION!
- $msg .= "Nombre: ".$name."\r\n"; // add sender's name to the message
- $msg .= "Email: ".$email."\r\n"; // add sender's email to the message
- $msg .= "Mensaje: ".$message."\r\n"; // add sender's email to the message
- $msg .= "Asunto: ".$subject."\r\n\n"; // add subject to the message (optional! It will be displayed in the header anyway)
- $msg .= "\r\n\n";
- $mail = @mail($to, $subject, $msg, "From:".$email); // This command sends the e-mail to the e-mail address contained in the $to variable
- /*
- header("Location: http://marcehernandez.com/");
- //This is the message that will be shown when the message is successfully send
- //exit;*/
- if($mail) {
- echo "asd";
- header("Location: http://marcehernandez.com/");
- } else {
- echo 'Your message not sent.'; //This is the message that will be shown when an error occured: the message was not send
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment