phpMailer issue with DIrectAdmin migrated host

I was using friday.mxlogin.com host till now which was cpanel. I have been migrated to shadow.mxrouting.net which is DIrectAdmin. But since then I am not able to send mail via phpMailer. Below is the code i use :

$mail->SMTPDebug = SMTP::DEBUG_SERVER;                      // Enable verbose debug output
$mail->isSMTP();                                            // Send using SMTP
$mail->Host       = 'shadow.mxrouting.net';                    // Set the SMTP server to send through
$mail->SMTPAuth   = true;                                   // Enable SMTP authentication
$mail->Username   = 'noreply@myemail.com';                     // SMTP username 
$mail->Password   = '********';                               // SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;         // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
$mail->Port       = 465;                                    // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
$mail->setFrom('noreply@myemail.com', 'myemail');
$mail->addAddress('contact@toemail.com', 'toemail');     // Add a recipient
$mail->isHTML(true);                                  // Set email format to HTML
$mail->Subject = 'Test subject 2';
$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
$mail->send();

This used to work perfectly with the earlier host friday(dot)mxlogin(dot)com however now i am getting following error :
“2021-01-31 12:10:53 SMTP ERROR: Failed to connect to server: Connection timed out (110) SMTP connect() failed.”

My IP is not blocked as i am able to send mails via other mailing system on this host itself without any issue.
I have tried changing to port 587 with PHPMailer::ENCRYPTION_STARTTLS but the result is the same. I also tried this with several different servers/ vps but the result is always the same.

Can anyone help??

Connection timed out is usually indicative of either a firewall issue, or port blocking by the host. Can you confirm that this is not the case?

Is this being hosted on a vps, or shared hosting?

I tried it on several 2 Dedicated + several VPS and the port is not blocked any where.

If i use the old host friday.mxlogin.com which is still available to me, i am still able send via port 465 & 587 via ssl / tls

My IP is not blocked as i am able to send mails via other mailing system on this host itself without any issue.

This phrase is the key one to me here. If that same IP can connect to Shadow and deliver mail but not through PHP, then it means the culprit is fairly low level. PHP config, CSF config, SMTP tweak in WHM, iptables SMTP block by UID (which I believe is what WHM SMTP tweak does, and CSF might as well). The variables demand that it’s the software stack.