Check if your hosting provider is blocking SMTP ports. Many providers, such as DigitalOcean, block these by default. To confirm whether this is the issue, run the test code locally.