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
$correo = $_POST['email']; require_once('phpMailer/class.phpmailer.php'); require_once("phpMailer/class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded $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 $mail->Host = 'smtp.live.com'; // SMTP server $mail->SMTPDebug = 0; // enables SMTP debug information (for testing) $mail->SMTPAuth = true; // enable SMTP authentication $mail->Host = 'smtp.live.com'; // sets the SMTP server $mail->SMTPSecure = 'tls'; $mail->Port = 25; // set the SMTP port for the GMAIL server
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