Nodemailer sends email but recipient does not receive it (hostgator server)

Posted on

Question :

I have an e-mail server on the hostgator and an account on it. I need to use nodemailer to send messages to my clients from this account. For this I need to manually configure with these instructions from the hostgator


    secure: true,
    auth: {
        user: '',
        pass: 'XXXXX'

However the email does not reach the recipient, I have tried to send to several different emails in several services.


Answer :

Digital Ocean by default blocks any e-mail connected to an external server. So if you use some API to connect via SMTP to a Google account, for example, Digital Ocean will not allow it. They do this to avoid creating spammer services.

If you request, they can unlock without problems, provided you send a message explaining the purpose of sending emails, describing in detail the purpose of the service.

The problem is that even if you do this, it is still possible to face a new blocker sooner or later, from the email provider (eg gmail), which does not allow automatic sending (via API) of an excessive number of emails.

The way I recommend it is to use the Mailgun service (, with it, you can send up to 10,000 messages monthly at no cost. And you can track everything that’s sent, including having click statistics, views, campaign building, and so on.


I had a problem with digital ocean blocking the SMTP port. The email quit beauty but it was not sent.
I asked for a support and they released. It was already.


Leave a Reply

Your email address will not be published. Required fields are marked *