Short answer: to send reliable email from your website or app, sign up for an SMTP service, verify your sending domain by adding the DNS records it gives you, create SMTP credentials, and enter the host, port (587 or 465), username and password in your app's mail settings. Then send a test and check that SPF, DKIM and DMARC pass.
"Why didn't I receive the contact form message?" and "I never got my order confirmation" are two of the most common website problems. The cause is almost always the same: the website sends email straight from the web server, and inboxes do not trust it. This guide shows how to fix it properly for WordPress, WooCommerce, Laravel and Node.js.
Why default website email fails
Most hosting lets websites send mail using a basic built-in function (PHP's mail()). Those messages:
- often lack proper SPF and DKIM authentication for your domain,
- come from a shared server whose reputation you do not control,
- leave no logs, so you cannot see whether they were delivered.
The result: contact-form messages and order confirmations land in spam or disappear. A dedicated sending service with a verified domain fixes all three problems.
How SMTP sending works
SMTP (Simple Mail Transfer Protocol) is the standard way email is sent. Your app connects to the sending service's SMTP server, logs in with your credentials, and hands over the message. The service signs it with your domain's DKIM key, sends it from servers listed in your SPF record, and records what happens to it.
Step 1: verify your sending domain
In your SiloLobby sending console, add the domain you send from, for example yourshop.com.ng. You receive DNS records to add:
| Record | Purpose |
|---|---|
| DKIM (3 CNAMEs) | Signs every email as your domain |
| MAIL FROM (MX and TXT) | Aligns the return path with your domain |
| SPF (TXT) | Authorises the sending servers |
| DMARC (TXT) | Sets your policy and reporting |
If your domain is registered with SiloLobby, we can add them for you. Verification usually completes within minutes of the records being published.
Step 2: create SMTP credentials
Create an SMTP login (or an API key for HTTP sending). The password is shown only once, so store it in a password manager or your app's secure configuration. Create separate credentials for each website or app so you can revoke one without affecting the others.
Step 3: connect your app
WordPress and WooCommerce
Install a well-known SMTP plugin, then enter:
- SMTP host: shown in your sending console
- Port: 587 with TLS, or 465 with SSL
- Authentication: on
- Username and password: your SMTP credentials
- From email: an address on your verified domain, such as orders@yourshop.com.ng
- From name: your business name
Turn on "force From email" so plugins cannot send from unverified addresses. Then use the plugin's test feature.
Laravel
In your .env file:
MAIL_MAILER=smtp
MAIL_HOST=your-smtp-host
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=orders@yourshop.com.ng
MAIL_FROM_NAME="Your Shop"
Clear the configuration cache after editing, then send a test notification.
Node.js with Nodemailer
const nodemailer = require("nodemailer");
const transporter = nodemailer.createTransport({
host: process.env.SMTP_HOST,
port: 587,
auth: { user: process.env.SMTP_USER, pass: process.env.SMTP_PASS },
});
await transporter.sendMail({
from: "Your Shop <orders@yourshop.com.ng>",
to: "customer@example.com",
subject: "Order confirmed",
text: "Thanks for your order! We will email you when it ships.",
});
Keep credentials in environment variables, never in your code repository.
Other apps and plugins
Almost any app that sends email has SMTP settings: CRMs, booking systems, helpdesks, invoicing software. Use the same host, port and credentials.
Step 4: test and check authentication
- Send a test to your own Gmail address.
- Open the email, choose Show original.
- Confirm SPF: PASS, DKIM: PASS and DMARC: PASS.
Your sending console also shows every email's status: delivered, bounced or complained.
Ports and encryption
| Port | Encryption | When to use |
|---|---|---|
| 587 | STARTTLS | Recommended default |
| 465 | SSL/TLS | When your app expects "SSL" |
| 25 | None or STARTTLS | Avoid; often blocked by networks |
Start in test mode
New SiloLobby sending accounts start in test mode: you can send to your own address and to addresses on your verified domains, up to 100 emails a day, while you connect everything. When you are ready, request full access from the console. We check your website and how people sign up, then turn on full sending. New accounts also ramp up gradually over two weeks to build a good reputation.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Authentication failed | Wrong username or password | Recreate credentials and paste them carefully |
| Connection timed out | Port blocked by your host or firewall | Try port 587 or 465 |
| "Sender not verified" | From address is not on a verified domain | Use an address on your verified domain |
| Emails in spam | Missing DKIM or DMARC, or poor content | Check records; review content and list |
| Gmail shows "via" | DKIM not aligned with your domain | Add the DKIM records from the console |
Security tips for SMTP credentials
- Store credentials in environment variables or your platform's secret storage, never in public code repositories.
- Use separate credentials for each website or app.
- Revoke credentials immediately if a developer leaves or a server is compromised.
- Watch your sending logs for unexpected volume, which can indicate stolen credentials.
Monitoring your sending
Once everything is connected, check your sending console regularly:
- Delivered: emails accepted by the recipient's server.
- Bounced: addresses that do not exist or rejected the email; they are suppressed automatically so you stop sending to them.
- Complaints: recipients who marked an email as spam. Investigate if these appear on transactional email.
A sudden rise in bounces often means a form is collecting mistyped addresses; adding email validation to the form helps.
Choosing your From address
Use a clear, consistent sender for each type of email:
| Email type | Example From address |
|---|---|
| Order confirmations and receipts | orders@yourshop.com.ng |
| Password resets and codes | security@yourshop.com.ng or no-reply@yourshop.com.ng |
| Contact form notifications | website@yourshop.com.ng |
| Account notices | accounts@yourshop.com.ng |
Whichever you choose, the address must be on your verified domain. If you use a "no-reply" address, make sure the email tells customers how to reach you.
SMTP or HTTP API?
Both send the same emails. SMTP works with almost every plugin and framework out of the box. An HTTP API call is often simpler from custom code, can be faster, and returns a message ID immediately for your logs. Many teams use SMTP for off-the-shelf software and the API for their own applications. SiloLobby email sending supports both, with the same verified domains, logs and limits.
Summary
Send website and app email through a proper SMTP service: verify your domain, create credentials, enter the host and port in your app, and confirm SPF, DKIM and DMARC pass. Your contact forms, receipts and codes will arrive reliably, with logs to prove it.