0

Here is my smtp code butit gives error

SMTP -> FROM SERVER:
SMTP -> FROM SERVER: F
SMTP -> ERROR: EHLO not accepted from server: F
SMTP -> FROM SERVER:
SMTP -> ERROR: HELO not accepted from server: SMTP -> NOTICE: EOF caught while checking if connectedLanguage string failed to load: tls Below is my smtp details i am using

$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;  // authentication enabled
$mail->SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for GMail
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465; 
$mail->Username = "*******"; // SMTP username
$mail->Password = "********"; // SMTP password
$mail->From = "*******"; //do NOT fake header.
$mail->FromName = "test";

$mail->AddAddress($to_email,"test"); // Email on which you want to send mail
$mail->IsHTML(true);

$mail->Subject = $subject;

$mail->Body = $mail_body;

0 Answers0