HEX
Server: Apache
System: Linux 65-254-81-60.cprapid.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64
User: roshanchandy (1003)
PHP: 8.4.12
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/roshanchandy/public_html/smtp/testmail.php
<?php

require("class.phpmailer.php");

$mail = new PHPMailer();

$mail->IsSMTP();
$mail->Host = "roshanchandy.com";

$mail->SMTPAuth = true;
//$mail->SMTPSecure = "ssl";
$mail->Port = 587;
$mail->Username = "testsmtp@roshanchandy.com";
$mail->Password = "2@@1TesT1@";

$mail->From = "testsmtp@roshanchandy.com";
$mail->FromName = "Test Mail from Support";
$mail->AddAddress("mailhostingserver@gmail.com");
//$mail->AddReplyTo("mail@mail.com");

$mail->IsHTML(true);

$mail->Subject = "Test message from server";
$mail->Body = "<b><centre>Test email via SMTP script!</centre></b>";
//$mail->AltBody = "This is the body in plain text for non-HTML mail clients";

if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "Message has been sent";

?>


// The values to be changed are :

$mail->Host = "ecowin.in"; -----------> SMTP server

$mail->Username = "test@ecowin.in"; -----------> Username
$mail->Password = "*********"; -----------> Password

$mail->Port = 587; -----------> 25 / 587

$mail->From = "info@ecowin.in"; -----------> From address required //