العربية

Hostinger SMTP settings: host, ports and fixes when sending fails

The exact Hostinger SMTP, IMAP and POP3 settings, a working Nodemailer example, and fixes for authentication errors, timeouts and emails that land in spam.

· 6 min read
Hostinger SMTP settings: host, ports and fixes when sending fails

Hostinger SMTP uses smtp.hostinger.com as the outgoing server, on port 465 with SSL. My own site sends its email this way. Port 587 with STARTTLS is the common alternative. For incoming mail, IMAP is imap.hostinger.com on port 993 with SSL, and POP3 is pop.hostinger.com on port 995.

That is the short answer. The rest of this article covers what to check when the settings look right and sending still fails, because that is where most of the time goes.

The Hostinger SMTP settings at a glance

Here are the values I use, plus the common alternatives:

Purpose Server Port Security
Outgoing (SMTP) smtp.hostinger.com 465 SSL/TLS
Outgoing (alternative) smtp.hostinger.com 587 STARTTLS
Incoming (IMAP) imap.hostinger.com 993 SSL/TLS
Incoming (POP3) pop.hostinger.com 995 SSL/TLS

Before you paste these anywhere, confirm them in your own account. In hPanel, go to Emails, pick your domain, and open Connect apps and devices. That page shows the exact server names and ports for your mailbox. Hosts sometimes change details, so treat the panel as the source of truth and this table as a guide. If you can't get into the panel at all, my Hostinger login guide covers the usual fixes.

A note on the two outgoing ports. Port 465 opens an encrypted connection from the first byte. Port 587 starts in plain text and then upgrades to encryption with STARTTLS. Both are secure when configured correctly. I use 465 because it is simple: one setting, secure: true, and done. Keep 587 in your back pocket, because it is your first move when 465 times out.

Username and password: where most errors start

Two rules solve most login problems:

  1. The username is the full email address, for example contact@example.com, not just contact.
  2. The password is the mailbox password, not your hPanel password. They are different. Your hPanel login opens the hosting dashboard. The mailbox password belongs to that one email account.

If you don't remember the mailbox password, reset it from the email section in hPanel. Then update it everywhere the mailbox is used: your phone, your mail client and your server config. One forgotten device with an old password can keep failing in the background and confuse your testing.

Sending from Node.js with Nodemailer

My site runs on a Hostinger VPS with Node.js managed by PM2. Its contact form and notifications go out through Hostinger SMTP. Here is a minimal, working Nodemailer setup with placeholders:

// send-test.js
const nodemailer = require("nodemailer");

const transporter = nodemailer.createTransport({
  host: "smtp.hostinger.com",
  port: 465,
  secure: true, // SSL on port 465
  auth: {
    user: "contact@example.com",
    pass: process.env.SMTP_PASS,
  },
});

async function main() {
  await transporter.verify();
  console.log("SMTP connection OK");

  const info = await transporter.sendMail({
    from: '"Example Site" <contact@example.com>',
    to: "your-inbox@example.org",
    subject: "SMTP test",
    text: "If you can read this, Hostinger SMTP works.",
  });

  console.log("Sent:", info.messageId);
}

main().catch((err) => {
  console.error("SMTP error:", err.message);
  process.exit(1);
});

Run it with the password in an environment variable, never in the code:

npm install nodemailer
SMTP_PASS='your-mailbox-password' node send-test.js

In production, keep the password in a .env file that is listed in .gitignore, or in your PM2 ecosystem config on the server. Do not commit it.

To use port 587 instead, change two lines:

port: 587,
secure: false,     // starts plain, then upgrades
requireTLS: true,  // refuse to send without STARTTLS

One more detail: keep the from address the same as the mailbox you log in with. Sending "from" a different address than the one you authenticate as is a common reason for rejection or a trip to spam.

Fixing "authentication failed" and connection timeouts

Most SMTP errors fall into two groups.

Authentication failed (often "535" in the error). The server answered, but it rejected your credentials. Check, in this order:

  • The username is the full address.
  • The password is the mailbox password, not the hPanel one.
  • There are no stray spaces or quote characters around the password in your .env file.
  • The mailbox actually exists and is active in hPanel.

If all of that looks right, reset the mailbox password, update it, and test again with the script above.

Connection timeout or "ECONNREFUSED". Your app never reached the server. Something between you and smtp.hostinger.com is blocking the port. Some hosting providers and networks block outgoing mail ports to fight spam, and a strict firewall on your own server can do the same. Test from the machine that sends the mail:

nc -vz smtp.hostinger.com 465
nc -vz smtp.hostinger.com 587

If 465 fails and 587 succeeds, switch to 587 with STARTTLS. If both fail, check your server's outgoing firewall rules and ask your hosting provider whether outbound mail ports are blocked. To see the actual TLS handshake, openssl helps:

openssl s_client -connect smtp.hostinger.com:465 -quiet
openssl s_client -starttls smtp -connect smtp.hostinger.com:587 -quiet

A greeting line that starts with 220 means the connection works and the problem is elsewhere.

When Hostinger email lands in spam

If mail sends without errors but arrives in spam, the cause is almost always domain authentication. Receiving servers check three DNS records:

  • SPF lists which servers may send mail for your domain.
  • DKIM adds a signature that proves the message wasn't changed.
  • DMARC tells receivers what to do when SPF or DKIM fails.

In my account, the email domain settings page in hPanel showed all three as set up. Check yours there first. If your domain's DNS is managed somewhere else, you need to add the records at that provider. My guide on a professional email on your own domain walks through the setup.

A related lesson from my own setup: I used to forward mail from my Hostinger mailbox to Gmail, and the forwarding relay sometimes rejected it with "550 5.7.1 Message blocked". The reliable fix was to send notifications straight through SMTP instead of relying on forwarding. I wrote up the details in why forwarded business email bounces.

WordPress: use an SMTP plugin

By default, WordPress sends mail through PHP's mail function. Many receivers distrust that, and some hosting setups restrict it. The fix is an SMTP plugin such as WP Mail SMTP, or any well-maintained alternative. Choose "Other SMTP" and enter:

  • Host: smtp.hostinger.com
  • Encryption: SSL, port 465 (or TLS, port 587)
  • Authentication: on
  • Username: the full email address
  • Password: the mailbox password

Set the "From email" to the same mailbox, then use the plugin's test email feature. If you are still choosing a host for a WordPress or Node.js site, you can look at Hostinger's plans here. For the bigger picture on panels, VPS and email, see my complete Hostinger guide.

FAQ

What are the Hostinger IMAP settings for Outlook or a phone?

IMAP server imap.hostinger.com, port 993, SSL. Outgoing server smtp.hostinger.com, port 465 with SSL. The username is your full email address and the password is the mailbox password. Confirm the values in hPanel under Connect apps and devices.

Should I use port 465 or 587 for Hostinger SMTP?

Either works. Start with 465 and SSL. If the connection times out, try 587 with STARTTLS, because some networks block one port and not the other.

Is there a sending limit on Hostinger email?

Limits depend on your email plan and can change. Check the current limits for your plan on Hostinger's site or in hPanel. If you send bulk newsletters, use a dedicated email marketing service rather than a mailbox.

Can I use Hostinger SMTP if my site is hosted elsewhere?

Yes. SMTP is just a login to your mailbox, so any server or app can use it if it can reach the outgoing port. You need an active Hostinger email account, which you can set up from their email plans.


Stuck on an SMTP error that won't go away? Talk to the editor at ahmed-adil.com.

Some links in this article are affiliate links; if you buy through them, Ahmed may earn a commission at no extra cost to you.

More from the Supplement