Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $nombre = $_POST['name'];
- $email = $_POST['email'];
- $mensaje = $_POST['message'];
- $to = 'martinpalmieri@gmail.com';
- $titulo = 'ASUNTO DEL MENSAJE';
- $header = 'From: ' . $email;
- $msjCorreo = "Nombre: $name\n E-Mail: $email\n Mensaje:\n $message";
- require("class.phpmailer.php");
- $mail=new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPAuth=true;
- $mail->Host="distrisoft.com.ar";
- $mail->Username="distrisoft@distrisoft.com.ar"; // usuario correo remitente
- $mail->Password="alkimia2014"; // contraseÒa correo remitente
- $mail->Port=25;
- $mail->From="info@istrisoft.com.ar"; // correo remitente
- $mail->FromName="nombre"; // nombre remitente
- $mail->AddAddress("martinpalmieri@gmail.com"); // destinatario
- $mail->IsHTML(true);
- $mail->Subject="Contacto via web";
- $body.= nl2br("Nombre y Apellido: \n$nombre $apellido");
- $body.= nl2br("\n\nCorreo:\n$email");
- $body.= nl2br("\n\nTelefono:\n$telefono");
- $body.= nl2br("\n\nEmpresa:\n$empresa");
- $body.= nl2br("\n\nConsulta:\n$message");
- $mail->Body=$body; // mensaje
- $enviar = $mail->Send(); // envia el correo
- if ($_POST['submit']) {
- if (mail($to, $titulo, $msjCorreo, $header)) {
- echo "<script language='javascript'>
- alert('Mensaje enviado, muchas gracias.');
- window.location.href = 'http://distrisoft.com.ar';
- </script>";
- } else {
- echo 'Falló el envio';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement