TheNavigator Posted October 5, 2012 Share Posted October 5, 2012 SMTP -> ERROR: EHLO not accepted from server: SMTP -> ERROR: HELO not accepted from server: SMTP -> ERROR: AUTH not accepted from server: SMTP -> NOTICE: EOF caught while checking if connectedSMTP Connect() failed. Thanfully, this time I've got an experienced person from namecheap to support me. We've tried to do everything we could, still doesn't work function smtpmailer($to, $body) { global $error; $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 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 = 465; $mail->Username = 'no-reply@unlicrea.com'; $mail->Password = '******'; $mail->SetFrom('no-reply@unlicrea.com', UnliCrea); $mail->Subject = 'Welcome to UnliCrea'; $mail->Body = $body; $mail->AddAddress($to); if(!$mail->Send()) { $error = 'Mail error: '.$mail->ErrorInfo; error_log($error); return false; } else { $error = 'Message sent!'; return true; } } I hope someone can help. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/269095-phpmailer-smtp-error-ehlo-not-accepted-from-server/ Share on other sites More sharing options...
darkfreaks Posted October 5, 2012 Share Posted October 5, 2012 In class.smtp.php search for the function Hello Replace: SendHello("EHLO", $host)) with SendHello("EHLO", "[" . $host . "]")) Replace: SendHello("HELO", $host)) with SendHello("HELO", "[" . $host . "]")) Quote Link to comment https://forums.phpfreaks.com/topic/269095-phpmailer-smtp-error-ehlo-not-accepted-from-server/#findComment-1382790 Share on other sites More sharing options...
TheNavigator Posted October 5, 2012 Author Share Posted October 5, 2012 (edited) It's solved, but that wasn't the problem. The problem was actually $mail->Host = 'smtp.gmail.com'; it shall be $mail->Host = 'ssl://smtp.gmail.com'; Thanks for your support, though Edited October 5, 2012 by TheNavigator Quote Link to comment https://forums.phpfreaks.com/topic/269095-phpmailer-smtp-error-ehlo-not-accepted-from-server/#findComment-1382836 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.