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

Asked

Viewed 1,358 times

4

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

inserir a descrição da imagem aqui

I have tested every possible combination of HOST x PORT in my source code. They all return failed sending, the only setting that sends the email is this.

var transporter = nodemailer.createTransport({
    host:"br688.hostgator.com.br",
    port:"465",
    secure: true,
    auth: {
        user: '[email protected]',
        pass: 'XXXXX'
    }
})

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

  • Make sure they have not blocked the mail services. They usually do so to avoid spammers.

3 answers

5


Digital Ocean by default blocks any email sent connected to an external server. So if you use an API to connect via SMTP to a Google account, for example, Digital Ocean won’t allow it. They do this to avoid creating spammer services.

If you request, they can do the unlocking 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 lock sooner or later by the email provider (e.g., gmail), which does not allow the automatic sending (via API) of an excessive number of emails.

The way I recommend is to use the Mailgun service (Mailgun.com), with it you can send up to 10,000 monthly messages at no cost. And you can still keep track of everything that’s sent, including statistics on clicks, views, campaign creation, etc.

3

I had a problem with digital Ocean that blocked the SMTP port. The email came out beautiful but was not sent. I asked for a support and they liberate. It’s gone.

3

I had the same problem, I added the parameter "name" in createTransport and funciounou. The email is still recognized as span when people receive, I’m trying to solve this problem (if possible), follow the example:

let transport = nodemailer.createTransport({
  name: '[email protected]',
  host:'mail.dominio.com.br',
  service:'mail.dominio.com.br',
  port:465,
  secure:true,
auth:{
    user: '[email protected]',
    pass:'pas123'
}});

I was able to solve using the suggestion of this other post: https://stackoverflow.com/questions/45305050/nodemailer-email-send-but-not-receive

Browser other questions tagged

You are not signed in. Login or sign up in order to post.