Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/03/2012, 11:25
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 7 meses
Puntos: 6
problema con el envio de correo utilizando phpMailer

hola amigos del foro espero me puedan ayudar

tengo una aplicacion que envia correos , como prueba estoy enviando correos por hotmail y toda va perfecto el inconveniente es que la aplicacion tiene que enviar correo por el correo interno de la empresa

este es el codigo que estoy utilizando

Código PHP:
Ver original
  1. $correo = $_POST['email'];
  2.  
  3.  
  4.  
  5.   require_once('phpMailer/class.phpmailer.php');
  6.  
  7.   require_once("phpMailer/class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
  8.  
  9.  
  10.  
  11.   $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
  12.  
  13.   $mail->IsSMTP(); // telling the class to use SMTP
  14.  
  15.   $mail->Host       = 'smtp.live.com'; // SMTP server
  16.  
  17.   $mail->SMTPDebug  = 0;                     // enables SMTP debug information (for testing)
  18.  
  19.   $mail->SMTPAuth   = true;                  // enable SMTP authentication
  20.  
  21.   $mail->Host       = 'smtp.live.com'; // sets the SMTP server
  22.  
  23.   $mail->SMTPSecure = 'tls';
  24.  
  25.   $mail->Port       = 25;                    // set the SMTP port for the GMAIL server
  26.  
  27.   $mail->Username   = '[email protected]'; // SMTP account username


para el nuevo requerimiento cambie las siguientes lineas

$mail->Host = 'smtp.live.com'; // aca estoy colocando el servidor de correo de la empresa
y

$mail->Username = 'omontes@correo'; y aca el correo que tengo en mi empresa desde donde voy a enviar le correo

me aparece el siguiente error , que puede ser ?

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Bogota' for 'COT/-5.0/no DST' instead in /var/www/html/calendario/phpMailer/class.phpmailer.php on line 2134 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Bogota' for 'COT/-5.0/no DST' instead in /var/www/html/calendario/phpMailer/class.phpmailer.php on line 2138 SMTP -> FROM SERVER:220 correo.ingeominas.gov.co ESMTP Postfix

SMTP -> FROM SERVER: 250-correo.ingeominas.gov.co 250-PIPELINING 250-SIZE 25240000 250-ETRN 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
SMTP -> FROM SERVER:502 5.5.1 Error: command not implemented
SMTP -> ERROR: STARTTLS not accepted from server: 502 5.5.1 Error: command not implemented
SMTP -> FROM SERVER:250 2.0.0 Ok
Fatal error: Uncaught exception 'phpmailerException' with message 'Language string failed to load: tls' in /var/www/html/calendario/phpMailer/class.phpmailer.php:896 Stack trace: #0 /var/www/html/calendario/phpMailer/class.phpmailer.php(797): PHPMailer->SmtpConnect() #1 /var/www/html/calendario/phpMailer/class.phpmailer.php(660): PHPMailer->SmtpSend('Date: Mon, 26 M...', '--b1_b5cb648176...') #2 /var/www/html/calendario/phpMailer/class.phpmailer.php(588): PHPMailer->PostSend() #3 /var/www/html/calendario/views/recu.php(60): PHPMailer->Send() #4 /var/www/html/calendario/controllers/user_Controller.php(111): require('/var/www/html/c...') #5 /var/www/html/calendario/index.php(67): recu() #6 {main} thrown in /var/www/html/calendario/phpMailer/class.phpmailer.php on line 896