Definition
SMTP is the text-based protocol, defined in RFC 5321, used to transfer email between systems. Two distinct uses share the name: submission, where an authenticated user hands a new message to their provider, and relay, where mail servers pass messages to each other until one accepts final delivery.
Why it matters
Every message you send passes through SMTP, and the choices made at submission decide whether it arrives, whether it is trusted, and whether an attacker can send in your name. Unauthenticated or unencrypted SMTP is how spam and spoofing were possible for decades; modern providers require both a login and TLS.
How it works
- Your client connects to the provider's submission port, negotiates TLS, and authenticates with your address and password.
- The provider accepts the message, adds a DKIM signature using your domain's private key, and queues it.
- An outbound worker looks up the recipient domain's MX record and connects to that server on port 25, using STARTTLS where offered.
- The receiving server checks SPF against the connecting IP, verifies the DKIM signature, applies the domain's DMARC policy, and accepts, quarantines or rejects.
The three ports
| Port | Use | Encryption | Authentication |
|---|---|---|---|
| 25 | Server-to-server relay | Opportunistic STARTTLS | None; often blocked outbound by ISPs |
| 587 | Client submission | STARTTLS, required before login | Required |
| 465 | Client submission | Implicit TLS from the first byte | Required |
ontechmail offers both submission ports; 465 is the simplest choice for most clients and is what autoconfig advertises.
Example: sending through ontechmail
From a desktop or phone client, use the settings on the IMAP page. From an application:
import smtplib, ssl
from email.message import EmailMessage
msg = EmailMessage()
msg["From"] = "alerts@yourdomain.co.zm"
msg["To"] = "ops@example.com"
msg["Subject"] = "Nightly report"
msg.set_content("All jobs completed.")
with smtplib.SMTP_SSL("mail.ontech.co.zm", 465, context=ssl.create_default_context()) as s:
s.login("alerts@yourdomain.co.zm", "MAILBOX_PASSWORD")
s.send_message(msg)
The REST API on the developers page is an alternative for applications that prefer HTTPS.
Common problems
- Connection times out on port 25. ISPs block it. Use 465 or 587.
- Authentication failed. Username is the full address; the mailbox password is the same one used for IMAP.
- Mail lands in spam. Usually a missing SPF or DMARC record, or a From address on a domain that is not hosted on ontechmail and therefore not signed.
- Sending limits. Per-mailbox rate limits exist to protect the domain's reputation; bulk campaigns should use the Ontech Bulk SMS or a dedicated bulk-mail arrangement rather than a mailbox.
SMTP on ontechmail
Submission requires TLS before authentication on both ports, uses the same credentials as IMAP, applies per-mailbox send limits and records submissions in the audit log. Outbound delivery is direct to the recipient's MX from Ontech infrastructure, DKIM-signed per domain, or relayed through a provider you nominate if your domain prefers that.
Frequently asked questions
What is SMTP?
SMTP, the Simple Mail Transfer Protocol, is the protocol mail servers use to hand messages to each other and that clients use to submit outgoing mail. Every email you send travels over SMTP from your client to your provider and from your provider to the recipient's.
What port does SMTP use?
Port 25 is used between mail servers. Clients submit mail on port 587 with STARTTLS or port 465 with implicit TLS, both requiring a username and password. Many networks block outbound port 25 to limit spam.
What are the ontechmail SMTP settings?
Server mail.ontech.co.zm, port 465 (SSL/TLS) or 587 (STARTTLS), authentication required, username is your full email address with your mailbox password.
Why does mail I send land in spam?
Usually because the sending domain lacks SPF, DKIM or DMARC records, or the message is sent from a server the domain has not authorised. ontechmail signs every message with the domain's DKIM key and shows the SPF and DMARC records to publish.