Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/01/2015, 14:29
calvo885
 
Fecha de Ingreso: enero-2015
Mensajes: 3
Antigüedad: 9 años, 3 meses
Puntos: 0
Quebradero de cabeza: PHPMAILER

POR FAVOR AYUDA LLEVO 4 DIAS CON LOS CODIGOS Y ME ESTOY VOLVIENDO LOCO Y NADIE A LOGRADO REDACTAR SOLUCION A ESTE PROBLEMA.

The following From address failed. Este es el error y ya nose lo que hacer para establecer una conexion ssl mediante phpmailer. Os pongo mi codigo:

Código PHP:
<?php
// example on using PHPMailer with GMAIL

require("lib/class.phpmailer.php");
require(
"lib/class.smtp.php"); // note, this is optional - gets called from main class if not already loaded

$mail             = new PHPMailer();

$body             "This is a Test";

$mail->IsSMTP();
$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

$mail->Username   "[email protected]";  // GMAIL username
$mail->Password   "******";            // GMAIL password

$mail->From       "[email protected]";
$mail->FromName   "Webmaster";
$mail->Subject    "This is the subject";
$mail->AltBody    "This is the body when user views in plain text format"//Text Body
$mail->WordWrap   50// set word wrap

$mail->MsgHTML($body);

$mail->AddReplyTo("[email protected]","Webmaster");

$mail->AddAddress("[email protected]","First Last");

$mail->IsHTML(true); // send as HTML

if(!$mail->Send()) {
  echo 
"Mailer Error: " $mail->ErrorInfo;
} else {
  echo 
"Message has been sent";
}
?>

PORFAVOR AYUDENME

Última edición por calvo885; 17/01/2015 a las 15:16