Digitalocean blocks SMTP entirely and won't open it even if you request them to. I have solved the problem by using the resend api, like they (resend) recommend, instead of using nodemailer.