I have a trouble trynig to send an email with PHPMailer, the code in the server is the next:
$Email = new PHPMailer();
$Email->isSMTP();
$Email->Host = "smtp.gmail.com";
$Email->SMTPDebug = 1;
$Email->SMTPAuth = true;
$Email->SMTPSecure = "tls";
$Email->Host = "smtp.gmail.com";
$Email->Port = 587;
$Email->Username = "noreply@MyMailService";
$Email->Password = "myPassword";
$Email->setFrom("noreply@MyMailService", "EnterpriseName");
$Email->Subject = $mensaje["destiny"];
$Email->AddAddress($mensaje["destiny"], "");
$Email->MsgHTML($mensaje["mensaje"]);
if(!$Email->send()){
echo "Error sending: " . $Email->ErrorInfo;
}else{
echo "E-mail sent";
}
So, I get this error when I test it with Postman:
edit: Image Removed
The mail host is the one provided for the hosting service, so I don't know, I'm not sure if the problem is with $Email->Host
and how can I get that parameter?