Varma Posted August 28, 2014 Share Posted August 28, 2014 Error: SMTP NOTICE: EOF caught while checking if connected SMTP connect() failed. Mailer Error: SMTP connect() failed. <?php require('class.phpmailer.php'); $mail = new PHPMailer();// create a new object $mail ->IsSMTP(); // enable SMTP $mail ->SMTPDebug = 1; // debugg ing: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail $mail->Host = "smtp.gmail.com"; $mail->Port = 587; // or 465 $mail->IsHTML(true); $mail->Username = "biz.online321@gmail.com"; $mail->Password = "mudunuru%^&"; $mail->SetFrom("example@gmail.com"); $mail->Subject = "Test"; $mail->Body = "hello"; $mail->AddAddress("varma.sfi123@gmail.com"); if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message has been sent"; } ?> Your help will be appericiated Link to comment Share on other sites More sharing options...
Martijn Geerts Posted August 28, 2014 Share Posted August 28, 2014 Welcome Varma, I don't know PHPMailer, but we have 2 modules to send over SMTP. You can use them. WireMailSmtp WireMailSwiftMailer 3 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted August 28, 2014 Share Posted August 28, 2014 (edited) I could suggest using this or this module to send mail via SMTP instead. They are very easy to use and extend WireMail class which is future-proof as it will be used in PW 2.5 core. They work only in dev version though. The links are the same as in Martijn's post, don't bother to compare )) Edited August 28, 2014 by Ivan Gretsky 3 Link to comment Share on other sites More sharing options...
Recommended Posts