Foros del Web » Programando para Internet » PHP »

phpmailer que funcione con gmai,hotmail i yahoo

Estas en el tema de phpmailer que funcione con gmai,hotmail i yahoo en el foro de PHP en Foros del Web. http://www.emailaddressmanager.com/t...-settings.html no se si es posible poner mas de un puerto en $mail->Port = 465; supongo que tendría que poner estos para asegurarme que funciona ...
  #1 (permalink)  
Antiguo 02/02/2010, 08:38
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
phpmailer que funcione con gmai,hotmail i yahoo

http://www.emailaddressmanager.com/t...-settings.html
no se si es posible poner mas de un puerto en $mail->Port = 465;

supongo que tendría que poner estos para asegurarme que funciona correctamente alguien lo ha probado lo digo porque a hora solo funciona de gmail a gmail pero no quiero discriminar si ha gente que utiliza yahoo o hotmail

Hotmail Incoming Mail Server (POP3) - pop3.live.com (logon using Secure Password Authentification - SPA, mail server port: 995)

Hotmail Outgoing Mail Server (SMTP) - smtp.live.com (SSL enabled, port 25)


Yahoo Incoming Mail Server (POP3) - pop.mail.yahoo.com (port 110)

Yahoo Outgoing Mail Server (SMTP) - smtp.mail.yahoo.com (port 25)

Yahoo Plus Incoming Mail Server (POP3) - plus.pop.mail.yahoo.com (SSL enabled, port 995)

Yahoo Plus Outgoing Mail Server (SMTP) - plus.smtp.mail.yahoo.com (SSL enabled, port 465, use authentication)


Google Gmail Incoming Mail Server (POP3) - pop.gmail.com (SSL enabled, port 995)

Outgoing Mail Server - use the SMTP mail server address provided by your local ISP or smtp.gmail.com (SSL enabled, port 465)


MSN Incoming Mail Server (POP3) - pop3.email.msn.com (port 110, using Secure Password Authentication - SPA)

MSN Outgoing Mail Server - smtp.email.msn.com (select "My outgoing server requires authentication")





Código PHP:
<?php

include("class.phpmailer.php"); 
     

//include("class.smtp.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       "localhost"// SMTP server 
  
$mail->SMTPDebug  2;                     // enables SMTP debug information (for testing) 
  
$mail->SMTPAuth   true;                  // enable SMTP authentication 
  
$mail->SMTPSecure "ssl";                 // sets the prefix to the servier 
  
$mail->Host       "smtp.gmail.com";      // sets GMAIL as the SMTP server 
  
$mail->Port       465;                   // set the SMTP port for the GMAIL server 
  
$mail->Username   "[email protected]";  // GMAIL username 
  
$mail->Password   "****************";            // GMAIL password 




  //$mail->AddReplyTo('[email protected]', 'First Last'); 
 
$mail->AddAddress(strtolower($_POST['correo']),strtolower($_POST['nombre']) ); 
$mail->SetFrom('[email protected]''negocio'); 
//$mail->AddReplyTo('[email protected]', 'First Last');//remitent 
$mail->Subject=("negocio ".strtolower($_POST['asunto'])); 
$mail->MsgHTML(strtolower($_POST['mensaje'])); 







$mail->Send(); 



  echo 
"<span class='correcto'><h2>Mensaje enviadao correctamente</h2></span>\n"
} catch (
phpmailerException $e) { 
echo 
$e->errorMessage(); //Pretty error messages from PHPMailer 
} catch (Exception $e) { 
echo 
$e->getMessage(); //Boring error messages from anything else! 

?>
</body>
</html>
  #2 (permalink)  
Antiguo 02/02/2010, 08:54
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Respuesta: phpmailer que funcione con gmai,hotmail i yahoo

No es necesario que pongas múltiples SMTP, un servidor SMTP te sirve para comunicarte a cualquier servidor.

Saludos.
  #3 (permalink)  
Antiguo 02/02/2010, 10:20
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
Respuesta: phpmailer que funcione con gmai,hotmail i yahoo

com he estado haciendo pruebas con diferentes cuentas me he liado pensando que no llegaban porque estaba mirando otra cuenta de gmail

gracias GatorV

en gmail y hotmail llega una copia del mensaje a las 2 partes del mensaje introducido en el formulario




en yahoo solo llega al servidor de gmail

cuando respondes a la cuenta de yahoo le llegan las 2 partes el mensaje que escribió el usuario de la cuenta de yahoo i el servidor de gmail
  #4 (permalink)  
Antiguo 02/02/2010, 11:10
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Respuesta: phpmailer que funcione con gmai,hotmail i yahoo

Ese ya no es problema de PHP, si no de que muchos servidores bloquean conexiones o los marcan como SPAM cuando vienen de IPs dinámicas.

Necesitas obtener una IP dedicada y registrarla en los hosts para que no sean marcados como SPAM.

Saludos.

Etiquetas: phpmailer, yahoo
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:58.