Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/07/2010, 10:26
Avatar de sonics2008
sonics2008
 
Fecha de Ingreso: diciembre-2009
Ubicación: Santiago, Chile
Mensajes: 60
Antigüedad: 14 años, 5 meses
Puntos: 2
Respuesta: No me llega el email

mira no se si te ayude pero hace algún tiempo utilice esta clase para enviar correos con datos adjuntos, hasta el día de hoy no he tenido problemas con los correos.

espero te ayude.

suerte........

Código PHP:
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
$mail->IsSMTP(); // telling the class to use SMTP

try {
  
$mail->Host       "xxxx"// SMTP DOMINIO DONDE SE ENVIA
  
$mail->SMTPDebug  2;                     // enables SMTP debug information (for testing)
  
$mail->SMTPAuth   false;                  // enable SMTP authentication
  
$mail->Host       "xxxxxx"// sets the SMTP server (DOMINIO DONDE SE ENVIA)
  
$mail->Port       25;                    // puerto predeterminado para envio de correo
  
$mail->Username   "'[email protected]', 'xxxxxxxxx'"// SMTP nombre usuario de la cuenta
  
$mail->Password   "xxxxx";        // SMTP passwords del usuario
  
$mail->AddReplyTo('[email protected]''xxxxxxxxx');  // enviar (A)
  
$mail->AddAddress('[email protected]''xxxxxxxxx');// enviar (a) 2
  
$mail->SetFrom('[email protected]''xxxxxxxxx'); // desde el correo
  
$mail->Addcc($correov,$correov); // enviado con copia.
  //$mail->AddReplyTo('[email protected]', 'First Last');
  
$mail->Subject "Pedido Nº_".$pedido."_".$fecha."_".$hora;
  
$mail->AltBody ''// opcional
  
$mail->MsgHTML(file_get_contents('contents.html'));
  
$mail->AddAttachment("usuarios/$cod_vend/".$name_file);      // adjunto
  
$mail->Send();
            
//echo "<font color='##00aaff' size='5'><center> Mensaje Enviado Sin Errores </p>\n</center></font>";
    
} catch (phpmailerException $e) {
            
//echo $e->errorMessage(); //Pretty error messages from PHPMailer
    
} catch (Exception $e) {
            echo 
"<font color=#FF4500 size='5'><center>No se Envio Mensaje a xxxxx :".$e->getMessage()."</center></font>"//Boring error messages from anything else!
    
}