Error sending email to user@mydomain.ro SMTP connect() failed

Hi ! I am trying to send a test email with smtp. I have php installed in a subdomain in a shared hosting account.

I’ve setup config credetinals, I tryed kinda all settings to see the error but I can’t find the exact problem.

When I create a campaign, I add the test subscriber and when I try to send the email, I get this :
Found them: 1 to process

Sending 24 to test@email.ro

It took 0.0044210000 seconds to send

Failed sending to subscriber@email.ro

Warning: script never reached stage 5

This may be caused by a too slow or too busy server

also, in this admin side I can’t see any errors on the page, no matter what settings I turn on.

the only errors I can see are in the system log of events :
Warning: script never reached stage 5 This may be caused by a too slow or too busy server
Error sending email to user@mydomain.ro SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub

I added in config : phpmailerhost, smtp user, smtp password, phpmailerport, phpmailer_secure.

Any help would be much appreciated. Is there any way I can see the exact problem ? like is the password incorrect, or the port ? idk.

I tryed to add SMTP::DEBUG_SERVER but still no precise error is showing.

Best regards !
Cosmin

@cosmin See this explanation of how to enable SMTP debug

If I check test campaign, the problem is the same and if I send from the campaign a test email, I get a blank page.

Edit, I had something in phpmailib, now I can see this.

2025-05-26 18:42:24 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo for smtp.mydomain.ro failed: Name or service not known (0)
SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub

Edit 2
I changed it to mail.mydomain.ro and now if I try to send a test email, it is loading and doing nothing.

Edit 3
I see an error in error log after the loop loading
PHP Fatal error: Uncaught TypeError: mysqli_fetch_array(): Argument #1 ($result) must be of type mysqli_result, false given in /admin/mysqli.inc:270