Foros del Web » Programando para Internet » PHP »

phpmailer i gmail ocular mesaje si se envia correctamente

Estas en el tema de phpmailer i gmail ocular mesaje si se envia correctamente en el foro de PHP en Foros del Web. se que es $mail->Send(); pero si lo comento despues no envia nada esta associado con class.phpmailer.php i class.smtp.php $mail->Send(); /echo "Message Sent OK</p>\n"; SMTP -> ...
  #1 (permalink)  
Antiguo 05/01/2010, 11:10
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
phpmailer i gmail ocular mesaje si se envia correctamente

se que es $mail->Send(); pero si lo comento despues no envia nada esta associado con class.phpmailer.php i class.smtp.php

$mail->Send();
/echo "Message Sent OK</p>\n";


SMTP -> FROM SERVER:220 mx.google.com ESMTP i34sm51720730gve.6
SMTP -> FROM SERVER: 250-mx.google.com at your service, [84.227.58.70] 250-SIZE 35651584 250-8BITMIME 250-AUTH LOGIN PLAIN 250-ENHANCEDSTATUSCODES 250 PIPELINING
SMTP -> FROM SERVER:250 2.1.0 OK i34sm51720730gve.6
SMTP -> FROM SERVER:250 2.1.5 OK i34sm51720730gve.6
SMTP -> FROM SERVER:354 Go ahead i34sm51720730gve.6
SMTP -> FROM SERVER:250 2.0.0 OK 1262710880 i34sm51720730gve.6
SMTP -> Message Sent OK
  #2 (permalink)  
Antiguo 05/01/2010, 11:17
Avatar de abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 14 años, 11 meses
Puntos: 1517
Respuesta: phpmailer i gmail ocular mesaje si se envia correctamente

¿Pero cual es la duda en sí?
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos
  #3 (permalink)  
Antiguo 05/01/2010, 15:18
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
Respuesta: phpmailer i gmail ocular mesaje si se envia correctamente

quiero que no muestre este mensaje para los usuarios

SMTP -> FROM SERVER:220 mx.google.com ESMTP i34sm51720730gve.6
SMTP -> FROM SERVER: 250-mx.google.com at your service, [84.227.58.70] 250-SIZE 35651584 250-8BITMIME 250-AUTH LOGIN PLAIN 250-ENHANCEDSTATUSCODES 250 PIPELINING
SMTP -> FROM SERVER:250 2.1.0 OK i34sm51720730gve.6
SMTP -> FROM SERVER:250 2.1.5 OK i34sm51720730gve.6
SMTP -> FROM SERVER:354 Go ahead i34sm51720730gve.6
SMTP -> FROM SERVER:250 2.0.0 OK 1262710880 i34sm51720730gve.6
  #4 (permalink)  
Antiguo 05/01/2010, 15:28
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: phpmailer i gmail ocular mesaje si se envia correctamente

y si pones el código mejor??
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #5 (permalink)  
Antiguo 05/01/2010, 15:37
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
Respuesta: phpmailer i gmail ocular mesaje si se envia correctamente

<form action="contactar.php" method="post" name="contactar" enctype="multipart/form-data">
<div>
<label for="correu">Correu <span class="obligatori">*</span></label>
<input type="text" name="correu" id="correu" maxlength="25" size="25" />
</div>

<div>
<label for="assumpte">Assumpte <span class="obligatori">*</span></label>
<input type="text" name="assumpte" id="assumpte" maxlength="25" size="25"/>
</div>

<div>
<label for="nom">Nom i Cognoms <span class="obligatori">*</span></label>
<input type="text" name="nom" id="nom" maxlength="25" size="15" />
</div>

<div>
<textarea type="text" id="missatge" name="missatge" cols="30" rows="10"></textarea>
<label for="missatge">Missatge <span class="obligatori">*</span></label>
</div>


<?php
//************************************************** *****************
//reCAPTCHA
//************************************************** *****************
require_once('recaptchalib.php');
$publickey = "******* ";
$privatekey = "********";

# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$error = null;

# are we submitting the page?
if ($_POST["submit"]) {
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);

if ($resp->is_valid) {
echo "You got it!";
# in a real application, you should send an email, create an account, etc
} else {
# set the error code so that we can display it. You could also use
# die ("reCAPTCHA failed"), but using the error message is
# more user friendly
$error = $resp->error;
}
}
echo recaptcha_get_html($publickey, $error);
?>



<br/>
<div class="botones">
<input type="submit" value="Enviar" />
</div>

<?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->AddAddress($_POST['correu'],$_POST['nom'] );
$mail->SetFrom('[email protected]', 'correo');
$mail->Subject=("correo2 ".$_POST['assumpte']);
$mail->MsgHTML($_POST['missatge']);


$mail->Send();


//echo "Message Sent OK</p>\n";

//} catch (phpmailerException $e) {

//echo $e->errorMessage(); //Pretty error messages from PHPMailer

//} catch (Exception $e) {

//echo $e->getMessage(); //Boring error messages from anything else!

//}

?>


</form>
  #6 (permalink)  
Antiguo 02/04/2010, 22:27
 
Fecha de Ingreso: abril-2010
Ubicación: Bogotá - Cundinamarca - Colombia
Mensajes: 13
Antigüedad: 14 años
Puntos: 0
Sonrisa Respuesta: phpmailer i gmail ocular mesaje si se envia correctamente

Cita:
Iniciado por albertrc Ver Mensaje

$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
eso lo debe cambiar por 1 asi:

Código PHP:
Ver original
  1. $mail->SMTPDebug  = 1;    // enables SMTP debug information (for testing)

Espero q le sirvaaa!!!

Última edición por carlos9005; 02/04/2010 a las 22:33

Etiquetas: correctamente, gmail, phpmailer
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 23:04.