Mailer Error: Language string failed to load: tls

Hiello There.
I have a problem that i am getting an error regarding PHPMailer.
Showing this error
Mailer Error: Language string failed to load: tls
Here is my code

$mail = new PHPMailer();

$mail->IsSMTP();                                 // set mailer to use SMTP
$mail->Username = "";  // SMTP username
$mail->Password = "RQ$$$*&%ss8*90"; // SMTP password
$mail->From = "";
$mail->FromName = "ss";
$mail->AddAddress("", "Josh Adams");

$mail->Subject = "Here is the subject";
$mail->Body    = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
$mail->Host = ""; // specify main and backup server
$mail->SMTPAuth = true;     // turn on SMTP authentication
$mail->SMTPSecure = 'tls';
$mail->SetLanguage( 'en', 'PHPMailer_5.2.0/language/' );
   echo "Message could not be sent. <p>";
   echo "Mailer Error: " . $mail->ErrorInfo;

echo "Message has been sent";

Thank you.

What version of PHP Mailer are you using?

Are you setting a Host?

PhpMailer version - 5.2

Well, the latest version is 6.0.1.

Perhaps SMTPSecure is not an option in PHP Mailer 5.2. You’re probably opening yourself up to security issues by not using the latest version.

There’s a suggestion on the doc page that you also need to set an alternative port to use TLS.

Do you have openssl installed and configured?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.