is my code correct or give some suggestion for sitemailxchange host and with port number..? i have check most of combination . Thanks in advance.
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
//$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.sitemailxchange.gate.com";
$mail->Port = 587;
$mail->Username = "yourmail@domain.com";
$mail->Password = "password";
$mail->SetFrom('yourmail@domain.com');
$mail->AddReplyTo("yourmail@domain.com");
$mail->Subject = "PHPMailer Test Subject via smtp (Gmail), basic";
$mail->AltBody = "To view the message, viewer!";
$mail->MsgHTML($body);
$address = "yourmail@domain.com";
$mail->AddAddress($address, "John Doe");
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}