TL;DR
A practical walkthrough for configuring an SMTP server or relay to send cold email: ports, TLS, auth, DNS records, and connecting a sequencer. Plus the deliverability trade-offs versus managed mailboxes.
What You Need to Send Cold Email Over SMTP
To send cold email over SMTP you need four things working together: an authenticated SMTP endpoint (a mail server or a relay service), a sending domain with correct DNS records, encryption on the connection (TLS), and a client or sequencer that submits messages using the right port and credentials.
The minimum checklist looks like this:
| Requirement | What It Is | Typical Value |
|---|---|---|
| SMTP host | The server or relay that accepts your mail | smtp.gmail.com, smtp.office365.com, or a relay |
| Submission port | The port your client connects to | 587 (STARTTLS) or 465 (implicit TLS) |
| Authentication | Username and password or token | App password / OAuth / API key |
| Encryption | TLS to protect credentials and content | STARTTLS on 587, SSL/TLS on 465 |
| Sending domain | The From domain you control | yourdomain.com |
| DNS records | SPF, DKIM, DMARC, and MX | Published in your DNS zone |
Get any one of these wrong and mail either fails to send or lands in spam. The rest of this guide walks through each piece. If you are unsure which port to use, our SMTP ports explained guide breaks down 25, 465, 587, and 2525 in detail.
SMTP Server vs SMTP Relay: Pick the Right Model
There are two ways to send. Running your own mail server (Postfix, Exim, or a self-hosted stack) gives you full control but puts you in charge of IP reputation, blacklist hygiene, and patching. Using an SMTP relay (the submission endpoint of Google Workspace, Microsoft 365, or a transactional provider) offloads the infrastructure but limits volume and configuration.
| Factor | Self-hosted SMTP server | Managed relay / provider |
|---|---|---|
| Setup time | Days (OS, MTA, certs, DNS, rDNS) | Minutes |
| IP reputation | You own it from zero | Shared or provider-managed |
| Blacklist risk | High if misconfigured | Lower, provider monitors |
| Deliverability for cold | Hard to achieve | Better with real mailboxes |
| Cost | VPS plus your time | Per-mailbox or per-message |
| Scaling | Manual | Add mailboxes or upgrade plan |
The deeper trade-offs of running your own box are covered in self-hosted email server and the distinction between the two endpoints in SMTP relay vs SMTP server. For cold outreach specifically, raw SMTP from a fresh IP almost always underperforms real provider mailboxes, which is why most senders use Google Workspace or Microsoft 365.
Step 1: Choose Ports and Encryption
Use the submission ports, not port 25. Port 25 is for server-to-server relay and is blocked outbound by most residential and cloud providers to limit spam. For a client or sequencer submitting authenticated mail, the choices are:
- Port 587 with STARTTLS is the modern default per RFC 6409. The connection starts in plaintext, then upgrades to TLS before credentials are sent.
- Port 465 with implicit TLS opens an encrypted connection immediately. It was deprecated, then re-registered for submission in RFC 8314, which now recommends implicit TLS.
- Port 2525 is an unofficial fallback some relays offer when 587 is blocked by a network.
Never submit authenticated mail without TLS. Sending credentials over plaintext exposes them on the wire. If a provider offers only port 25 for submission, that is a red flag.
Step 2: Configure Authentication
Modern providers no longer accept a plain account password over SMTP. You will use one of three mechanisms:
App passwords. Google Workspace and Microsoft 365 let you generate a single-purpose password for SMTP clients when basic auth is still permitted. This is the simplest path for a sequencer that supports SMTP credentials.
OAuth 2.0 (XOAUTH2). The preferred and increasingly required method. The client exchanges a token rather than a static password. Microsoft has been retiring basic authentication for Exchange Online, so OAuth is the durable choice. See Microsoft 365 SMTP settings for the exact host, port, and auth flow.
API keys. Transactional relays authenticate with an API key over SMTP AUTH or via an HTTP API.
A failed login returns a 535 5.7.8 authentication error. If you see that, regenerate the app password, confirm the username is the full email address, and verify the account is licensed for SMTP. The full catalog of failures is in common SMTP errors and fixes.
Step 3: Publish the DNS Records
Authentication records are what stand between your mail and the spam folder. Google and Yahoo require SPF, DKIM, and a DMARC policy for bulk senders, and treat missing records as a strong negative signal. The four records you need:
| Record | Purpose | Where to Configure |
|---|---|---|
| SPF | Lists IPs/hosts allowed to send for your domain | TXT record, one per domain |
| DKIM | Cryptographically signs each message | TXT record with provider's public key |
| DMARC | Tells receivers what to do on auth failure | _dmarc TXT record |
| MX | Routes inbound mail to your mailbox host | MX records at the domain apex |
Start with the SPF record setup, then DKIM setup, then DMARC setup. If you want the full picture of how the three interlock, read email authentication SPF DKIM DMARC explained. Stay under the SPF 10-lookup limit, and start DMARC at p=none so you can monitor reports before enforcing.
For server-to-server delivery you also want a PTR (reverse DNS) record matching your sending hostname. Many receivers reject mail from IPs without valid forward-confirmed reverse DNS.
Step 4: Connect Your Sequencer
Once the server, ports, auth, and DNS are in place, connect your sending tool. Most sequencers accept either native provider integration (recommended) or raw SMTP credentials.
Native integration uses OAuth to connect Google Workspace or Microsoft 365 directly. This is more stable and respects provider sending limits cleanly.
SMTP connection requires you to enter host, port, username, and password. A typical Google Workspace configuration:
Host: smtp.gmail.com
Port: 587
Encryption: STARTTLS
Username: [email protected]
Password: <app password>After connecting, send a test message to a seed inbox and check the headers with Gmail's Show Original view. Confirm SPF, DKIM, and DMARC all show PASS. Respect the per-mailbox daily caps documented in email sending limits for Google and Microsoft; exceeding them triggers rate-limit errors and reputation damage.
Step 5: Warm Up Before Volume
A new domain and a new sending identity have no reputation. Sending a few hundred cold emails on day one from a fresh setup is the fastest way to the spam folder or an outright block. Ramp gradually.
| Week | Approx. daily volume per mailbox | Focus |
|---|---|---|
| 1 | 5 to 10 | Warmup network only |
| 2 | 10 to 20 | Warmup plus a few real sends |
| 3 | 20 to 30 | Increase real sends |
| 4+ | 30 to 50 | Steady-state cold volume |
These figures are guidance, not guarantees; engagement signals matter more than raw numbers. The full process is in the cold email warmup guide and domain warmup best practices. Monitor reputation throughout with Google Postmaster Tools.
Why Managed Mailboxes Often Beat Raw SMTP for Cold Email
Raw SMTP from a self-built server can work for transactional mail, but cold outreach is judged on inbox placement, and that depends on reputation you cannot buy overnight. A fresh IP, an unsigned hostname, or a single misconfigured record can sink an entire campaign.
Managed providers solve the reputation and configuration problem. InboxKit provisions real Google Workspace, Microsoft 365, and Azure mailboxes on US IPs, and configures SPF, DKIM, DMARC, and MX automatically through Cloudflare in under 60 seconds. Its InfraGuard monitoring runs blacklist checks every six hours, watches your DNS, and auto-pauses sending if something breaks, which removes the most common cause of cold-email failure: silent misconfiguration. It connects to 24-plus sequencers natively, so you skip manual SMTP credential entry entirely.
The trade-off is control versus reliability. If you need fine-grained server control, self-host. If you need cold email to land, real mailboxes with managed DNS win. Pricing and slot counts are in InboxKit pricing.
Troubleshooting Checklist
When mail fails to send or lands in spam, work through this list in order:
- 1Connection refused or timeout. Port 25 is blocked, or you are using the wrong port. Switch to 587 or 465.
- 2535 authentication failed. Wrong username, expired app password, or basic auth disabled. Regenerate credentials or move to OAuth.
- 3TLS handshake errors. Mismatched encryption mode for the port (implicit TLS on 587, or STARTTLS on 465). Match the mode to the port.
- 4550 relay denied. The server will not relay for your domain or recipient. Authenticate, or confirm the relay allows your domain.
- 5Mail sends but goes to spam. Check SPF, DKIM, and DMARC pass; check the domain and IP against blacklists with check domain blacklisted; and review why cold emails go to spam.
- 6Sudden delivery drop. Run a blacklist removal check and review reputation in Postmaster Tools.
Each numeric reply maps to a defined meaning, explained in SMTP error codes explained.
Frequently Asked Questions
Use port 587 with STARTTLS as the default, or port 465 with implicit TLS. Avoid port 25 for submission, since most networks block it outbound and it is meant for server-to-server relay, not authenticated client sending.
No. Most senders use the SMTP relay of a provider like Google Workspace or Microsoft 365, or managed mailboxes. Running your own server gives full control but requires you to manage IP reputation, reverse DNS, blacklists, and patching yourself.
At minimum SPF, DKIM, and DMARC for authentication, plus MX records to receive replies. A PTR (reverse DNS) record is also expected for self-hosted servers. Missing records are a primary reason cold email lands in spam.
A 535 5.7.8 error means authentication failed. The usual causes are a wrong username (use the full email address), an expired or missing app password, or basic auth being disabled in favor of OAuth. Regenerate credentials or switch to OAuth.
Volume is limited by provider sending caps and by your IP and domain reputation. Sending too fast triggers rate-limit errors and reputation damage. Warm up gradually and respect per-mailbox daily limits before scaling.
Sources & References
- 1
RFC 6409 - Message Submission for Mail(2025)
- 2
RFC 8314 - TLS for Email Submission and Access(2025)
- 3
RFC 5321 - Simple Mail Transfer Protocol(2025)
- 4
Google Workspace - Send email from a printer, scanner, or app (SMTP)(2025)
- 5
Microsoft - How to set up a multifunction device to send email using Microsoft 365(2025)
- 6
Google Email Sender Guidelines(2025)
Related articles
SMTP Ports Explained: 25, 465, 587, and 2525
SMTP Relay vs SMTP Server: A Practical Comparison
Should You Self-Host an Email Server for Cold Outreach?
Microsoft 365 SMTP Settings and How to Configure Them
SPF Record Setup Guide for Cold Email (2026)
Ready to set up your infrastructure?
Plans from $39/mo with 10 mailboxes included. Automated DNS, warmup, and InfraGuard monitoring included.