Saturday, 15 May 2010

php - SMTP connect() failed -



php - SMTP connect() failed -

reciently, in 1 webpage installed in localhost, configurated phpmailer, , works perfectly. sents emails gmail account. but, same configuration, uploaded webpage internet, , gives "error: smtp connect() failed."

i tryed alot of examples , tons of "solution answers" , continues giving error.

here actual configuration file:

include("mailer/class.phpmailer.php"); include("mailer/class.smtp.php") ; $mail = new phpmailer; $mail->issmtp(); $mail->smtpauth = true; $mail->smtpsecure = "ssl"; $mail->host = "smtp.gmail.com"; $mail->port = 465; $mail->username = "myemail@gmail.com"; $mail->password = "supersecurepassword"; $mail->setfrom($email, $name); $mail->addreplyto("myemails@gmail.com","test"); $mail->subject = $subject; $mail->msghtml("email enviado por: ".$email."<br/>".$contact_message); $address = "email@gmail.com"; $mail->addaddress($address, "pedo"); if(!$mail->send()) { echo "mailer error: " . $mail->errorinfo; } else { echo "message sent!"; }

google blocking loggin attemtps time. here: click here google said me dont accepting user , pass. clicked here unlocked business relationship utilize on web. help.

php email web phpmailer

No comments:

Post a Comment