I am trying to use PHPMailer in cpanel, but with this code it sends me a error code 500, and I am not sure where to find additional information about this error.
<?php
require("./class.phpmailer.php");
$own = new PHPMailer();
$own->IsSMTP();
$own->SMTPDebug = 1;
$own->SMTPAuth = true;
$own->SMTPSecure = 'none';
$own->Host = "smtp-relay.sendinblue.com";
$own->Port = 587;
$own->IsHTML(true);
$own->SetLanguage("en", "phpmailer/language");
$own->CharSet ="utf-8";
$own->Username = "foo@bar.com";
$own->Password = "foobar";
$own->SetFrom("foo@bar.com", "foo bar");
$own->AddAddress("bar@foo.com");
$own->Subject = "Test";
$own->Body = "Welcome";
if(!$own->Send()){
echo "Mailer Error: ".$own->ErrorInfo;
$status = 2;
}
else {
$status = 1;
}
?>