Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/12/2010, 08:28
miguelrlps
 
Fecha de Ingreso: junio-2010
Mensajes: 135
Antigüedad: 13 años, 10 meses
Puntos: 14
PHP en open classifieds

Hola a todos, este programa lo tengo instalado en mi web pero cuando se envía un anuncio pone:

Mailer Error: SMTP Error: Could not connect to SMTP host.

Según 1and1 está todo correcto, y si configuro el SMTP de Gmail tampoco va, me han dicho que tengo que modificar el common.php pero no tengo ni idea de qué modificar, tengo que sustituir SMTP por send mail, alguien me puede decir en que línea y como.

Este es el fragmento de código donde creo que hay que modificar, ayudeneme por favor:

Código PHP:
///////////////////////////////////////////////////////////
function sendEmail($to,$subject,$body){//send email using smtp from gmail
    
sendEmailComplete($to,$subject,$body,NOTIFY_EMAIL,SITE_NAME);
}
////////////////////////////////////////////////////////////
function sendEmailComplete($to,$subject,$body,$reply,$replyName){//send email using smtp from gmail
    
$mail             = new PHPMailer();
    
$mail->IsSMTP();

    
//SMTP HOST config
    
if (SMTP_HOST!=""){
        
$mail->Host       SMTP_HOST;              // sets custom SMTP server
    
}

    
//SMTP PORT config
    
if (SMTP_PORT!=""){
        
$mail->Port       SMTP_PORT;              // set a custom SMTP port
    
}

    
//SMTP AUTH config
    
if (SMTP_AUTH==true){
        
$mail->SMTPAuth   true;                   // enable SMTP authentication
        
$mail->Username   SMTP_USER;              // SMTP username
        
$mail->Password   SMTP_PASS;              // SMTP password