
How an email travels with SMTP
Technically, an email is a text with header lines that is passed on from server to server. SMTP governs these handovers. The protocol is one of the oldest on the internet and is described in the standard RFC 5321[1]. It works with short plain-text commands, to which the server replies with three-digit codes.
- Submit
Your email program connects to your provider’s SMTP server, logs in with a username and password and hands over the message.
- Find the recipient
The server looks up the MX record of the recipient’s domain in the DNS. It states which server accepts emails for that domain.
- Pass it on
The server delivers the email by SMTP to the recipient’s server. That server checks the sender, signatures and spam characteristics.
- Store
The email lands in the recipient’s mailbox. It is fetched later by IMAP or POP3, not by SMTP.
The reply codes help with troubleshooting. Codes beginning with 2 mean success, codes beginning with 4 a temporary error, where the server tries again later, and codes beginning with 5 a permanent error. The well-known response “550 User unknown”, for example, means that the recipient address does not exist.
SMTP server, ports and encryption
Anyone connecting an email program or a piece of software to their mailbox usually has to provide four details about the SMTP server: server name, port, encryption and login. The correct values are in your email provider’s help pages. These combinations are common today:
| Port | Encryption | Use |
|---|---|---|
| 465 | TLS from the start (implicit) | Submission by email programs, recommended since RFC 8314 |
| 587 | STARTTLS, the connection is upgraded to encryption | Submission by email programs, widely used |
| 25 | optional STARTTLS | Handover between mail servers, often blocked on residential connections |
You should no longer use unencrypted connections, because the password and content are then transmitted in plain text. The standard RFC 8314 recommends a connection protected by TLS from the start for submitting emails[2]. With most providers, the username is the full email address.
SPF, DKIM and DMARC: making sure emails arrive
SMTP itself does not check whether a sender is genuine. That is why extensions have been developed that work through entries in the DNS of your own domain. If they are missing, quotes (Offerten) and invoices end up in the customer’s spam folder more quickly:
- SPF specifies which servers may send emails on behalf of your domain.
- DKIM adds a digital signature that the recipient uses to check that the email was not altered on the way.
- DMARC tells the recipient what should happen to emails that fail SPF or DKIM, and sends reports about them.
If you send emails not only from your own email program but also from software, a newsletter service or a web form, you must include these senders in SPF and DKIM. The settings are made by your domain provider or IT company. For sending advertising, the rules on double opt-in and consent also apply.
Your own mailbox or sending through the software?
Many programs for quotes, invoices or appointments can send emails in two ways. Either through a sending service run by the software provider, which sends on the company’s behalf, or through the SMTP server of the company’s own mailbox. The second way has several advantages day to day. The email comes from the familiar address, the customer’s replies land directly in your own inbox, and a copy is kept in the Sent folder, so that Outlook or Apple Mail also show the whole history.
The price for this is the login details: the software must be allowed to log in to the mailbox with a username and password. Reputable providers store these details encrypted and only connect via TLS. Before setting it up, ask where the data is stored and who can access it.
Common mistakes when setting up
- Wrong port for the encryption: Port 465 with STARTTLS or port 587 with implicit TLS leads to timeouts.
- Incoming instead of outgoing mail server: The IMAP server often has a similar name but does not accept SMTP connections.
- Password-only login not allowed: Large cloud providers such as Google Workspace and Microsoft 365 no longer allow login with a password and require OAuth.
- Sender address does not match the account: Many servers reject emails whose sender does not belong to the logged-in mailbox.
- Sending limit reached: Providers limit the number of emails per hour or day. Bulk emails belong in a sending service built for that purpose.
A practical example
Example: setting up outgoing mail for an electrical business
The invented Elektro Muster GmbH from Sursee wants to send quotes from its software in future using its own address offerte@ at its domain. The hosting provider’s help pages give the details: SMTP server mail. followed by the domain, port 465, encryption SSL/TLS, the username is the full email address. For incoming mail, the same server applies with port 993 for IMAP.
On the first attempt, the office manager entered port 587 with SSL/TLS, and the connection breaks off after 30 seconds. With port 465, the login works. Afterwards, the IT company checks whether the hosting provider is listed in the domain’s SPF record and whether DKIM is active. A test email to a private mailbox arrives in the inbox, not in spam.
Invented example. Server names and ports depend on your email provider.
How VoxCRM helps
partlyIn VoxCRM you connect your own mailbox via IMAP and SMTP with a password. VoxCRM recognises the provider from the MX record, suggests servers and ports and tests the login before saving. Emails sent are then stored in the Sent folder of your mailbox and with the contact. Mailboxes at Google Workspace or Microsoft 365 that only allow OAuth cannot be connected yet.
