BetaClaim your site
Guide

How to send email from your website (SMTP port 587)

Updated 1 September 2026

Send email from your website through an authenticated SMTP service on port 587 (for example your HNN Business Email account, Google Workspace, or a transactional provider like Resend or Brevo). Do not rely on the server's built-in mail() function: mail sent straight from web servers is routinely rejected or marked as spam because the server IP is not your email identity. On HostNowNow hosting, PHP mail() is intentionally disabled and outbound port 587 is open, so any SMTP plugin or library works out of the box.

Why mail() does not work on modern hosting

Email deliverability today is decided by domain authentication (SPF, DKIM, DMARC), not by whichever machine makes the connection. When a web server sends mail directly, the receiving side sees a mismatch between your domain and the sending IP and files the message as spam - or rejects it outright. Shared server IPs also inherit the reputation of every site on the box.

That is why HostNowNow web servers do not run a mail service at all: your site sends through a real mailbox or a transactional email provider over SMTP port 587, which authenticates as YOUR domain and inherits YOUR sending reputation.

WordPress setup (5 minutes)

Install any SMTP plugin - WP Mail SMTP, FluentSMTP, and Post SMTP are all fine - then enter your provider's settings:

  • SMTP host: your provider's server, e.g. mail.hostnownow.com for HNN Business Email.
  • Port: 587 with TLS/STARTTLS encryption (the standard submission port).
  • Username: the full mailbox address, e.g. hello@yourdomain.com.ng.
  • Password: the mailbox password (or an app password if the provider uses them).
  • From address: the same mailbox, so SPF and DKIM align with the sending domain.
  • Send the plugin's test email and check it lands in the inbox, not spam.

Plain PHP, Laravel, and other stacks

Use PHPMailer or Symfony Mailer in plain PHP, or set MAIL_MAILER=smtp with the same host/port/credentials in Laravel's .env. Node.js apps use Nodemailer with an identical SMTP transport. Every framework's SMTP transport asks for the same four values: host, port 587, username, password.

For high-volume or purely transactional mail (receipts, notifications), a provider such as Resend, Brevo, or Postmark gives you an SMTP endpoint plus deliverability dashboards - point the same plugin or library at their host and port 587.

Checklist when email still goes to spam

Fix these in order - the first two solve most cases:

  • SPF: your domain's TXT record must include your SMTP provider (e.g. include:mail.hostnownow.com or the provider's include).
  • DKIM: enable it at the provider and publish the DKIM TXT record they give you.
  • DMARC: publish at least v=DMARC1; p=none; rua=mailto:you@yourdomain so providers report on alignment.
  • From address matches the authenticated mailbox - never send as gmail.com from your own SMTP.
  • Warm up: brand-new domains sending hundreds of emails on day one look like spam regardless of setup.

Frequently asked questions

Why is PHP mail() disabled on HostNowNow hosting?
Because mail sent directly from web servers is mostly rejected or spam-filtered, and one compromised site spamming from a shared IP would hurt every customer. Authenticated SMTP on port 587 delivers reliably and keeps reputations separate.
Which port should I use: 25, 465, or 587?
Use 587 with STARTTLS - it is the standard authenticated submission port and is open on HostNowNow hosting. Port 25 is for server-to-server relay and is blocked on most networks; 465 (implicit TLS) also works if your provider prefers it.
Can I use my HNN Business Email account for my website's emails?
Yes. Use mail.hostnownow.com, port 587, your full mailbox address as the username, and the mailbox password. The From address should be the same mailbox.
Do I need a transactional email service for a small contact form?
No. A regular mailbox over SMTP 587 handles low-volume contact forms fine. Move to a transactional provider when you send hundreds of automated emails a day or need delivery analytics.

More guides