require("class.phpmailer.php");
if ($_POST['action'] == "send") {
$varname = $_FILES['archivo']['name'];
$vartemp = $_FILES['archivo']['tmp_name'];
$mail = new PHPMailer();
$mail->Host = "mail.stilomexicano.com";
$mail->SMTPAuth = true;
$mail->Username = "
[email protected]";
$mail->Password = "********";
$mail->From = "
[email protected]";
$mail->FromName = "Stilo Mexciano";
$mail->Subject = "Solicitud de Cotización";
$mail->AddAddress($_POST['correo']);
if ($varname != "") {
$mail->AddAttachment($vartemp, $varname);
}
$body = "<strong>NOMBRE:</strong><br><br>";
$body.= $_POST['descripcion']."<br>";
$body = "<strong>CORREO:</strong><br><br>";
$body.= $_POST['correo']."<br>";
$body = "<strong>TELEFONO:</strong><br><br>";
$body.= $_POST['telefono']."<br>";
$body = "<strong>DESCRIPCION:</strong><br><br>";
$body.= $_POST['descripcion']."<br>";
$body.= "<i>Enviado por http://stilomexicano.com</i>";
$mail->Body = $body;
$mail->IsHTML(true);
$mail->Send();
}?>