My website URL is:
http://tribalscripts.epizy.com
What I’m seeing is:
502 Bad Gateway
I’m using this software:
I’m simply using PHPMailer like the example in your website but i always see the same error “502 Bad Gataway”, why?! Please help me, i want only simply send a mail. Below my code:
date_default_timezone_set('Etc/UTC');
ini_set(‘display_errors’,‘On’);
error_reporting(E_ALL);
require (“PHPMailer.php”);
require (“Exception.php”);
require (“SMTP.php”);
require (“OAuth.php”);
require (“POP3.php”);
$mail = new PHPMailer\PHPMailer\PHPMailer();
$mail->IsSMTP();
$mail->Host = ‘smtp.gmail.com’;
$mail->Port = 587;
$mail->SMTPSecure = ‘tls’;
$mail->SMTPAuth = true;
$mail->Username = $myusername;
$mail->Password = $mypsw;
$mail->SMTPDebug = 2;
$mail->setFrom(‘test@test.com’, ‘Awesome Website’);
$mail->addAddress(‘test2@test.com’, ‘John Doe’);
$mail->Subject = ‘PHPMailer GMail SMTP test’;
if(!$mail->send()) {
echo ‘Message was not sent.’;
echo 'Mailer error: ’ . $mail->ErrorInfo;
} else {
echo ‘Message has been sent.’;
}