Ver Mensaje Individual
  #15 (permalink)  
Antiguo 28/08/2013, 07:27
Cristian23CL4PTP
 
Fecha de Ingreso: agosto-2013
Ubicación: Talca
Mensajes: 40
Antigüedad: 10 años, 8 meses
Puntos: 1
Respuesta: Me es imposible usar PHPMailer

Cita:
Iniciado por cesa_r Ver Mensaje
En principio cambia:

Código PHP:
mail->From $email;
$mail->FromName $nombre
por:
Código PHP:
$mail->SetFrom($email$nombre); 
como lo dejaste simpre pon el codigo completo.
Estimado cesar, finalmente el código quedo así, y lamentablemente sigue sin funcionarme, a pesar de que no me muestra ningún error:

Código PHP:
<?php
require_once('class.phpmailer.php');
require_once(
'class.smtp.php');
$asunto $_POST['asunto'];
$nombre $_POST['nombre'];
$email $_POST['mail'];
$telefono $_POST['telefono'];
$empresa $_POST['empresa'];
$descripcion $_POST['descripcion'];
$adjunto $_FILES['adjunto']['name'];
$adjuntotmp $_FILES['adjunto']['tmp_name'];

$mail = new PHPMailer();
$mail->Host "smtp.hotmail.com";
$mail->SMTPAuth true;
$mail->Username "[email protected]";
$mail->Password "mipass";
$mail->SetFrom($email$nombre); 
$mail->Subject $asunto;
$mail->AddAddress('[email protected]');
if (
adjunto != '') {
    
$mail->AddAttachment($adjuntotmp$adjunto);
}
$body '<strong>Nombre</strong>: ' $nombre '<br />';
$body .= '<strong>Mail</strong>: ' $email '<br />';
$body .= '<strong>Teléfono</strong>: ' $telefono '<br />';
$body .= '<strong>Empresa</strong>: ' $empresa '<br />';
$body .= '<strong>Descripción</strong>: ' $descripcion '<br />';
$mail->Body $body;
$mail->CharSet 'UTF-8';
$mail->IsHTML(true);
$mail->Send();

echo 
'<script type="text/javascript">alert("Su informacion ha sido enviada con exito !");location.href="/?home";</script>';
?>