Every message you send travels in two SMTP steps. First, the mail app on your phone or computer hands it to the outgoing server after logging in. Then that server looks up the recipient domain’s MX record and delivers it to their server, where it waits until the recipient reads it over IMAP or POP3.
Ports and encryption
| Port | Used for | Encryption |
|---|---|---|
25 |
Server to server | Optional STARTTLS |
587 |
App to server (submission) | STARTTLS |
465 |
App to server | SSL/TLS from the start |
The mail app on your phone or computer normally uses 465 or 587 with a login; port 25 is left for servers talking to each other.
What an SMTP session looks like
Simplified, the app and server exchange text commands and numeric codes:
S: 220 mail.example.com ESMTP
C: EHLO laptop.local
S: 250-mail.example.com
C: AUTH LOGIN
S: 235 Authentication succeeded
C: MAIL FROM:<[email protected]>
C: RCPT TO:<[email protected]>
C: DATA
S: 250 OK queued
Codes starting with 2 mean success, 4 a temporary error that will be retried, and 5 a permanent rejection such as error 550.
Common problems
535 Authentication failed: the username must be the full email address, or the password is wrong. See error 535.- Connection timeouts: the port is blocked on your network, or the encryption setting doesn’t match the port.
- Mail lands in spam: SMTP only carries the message; trust depends on SPF, DKIM, DMARC and server reputation.
- Website forms don’t send: PHP’s
mail()function may not be enough; send form mail over SMTP with a real mailbox.
On ArabyHost
Business email on ArabyHost works over IMAP and SMTP, with SPF and DKIM set up automatically, and the server and port settings for your app are on the email help page. Sending is capped per hour per domain, so use a specialised service for large campaigns. See business email.
FAQ
Which SMTP port should I use, 465 or 587?
Both are secure with authentication. Port 465 is encrypted from the start (SSL/TLS), while 587 starts plain and upgrades with STARTTLS. Use whatever your mail settings specify.
Why doesn't port 25 work from my computer?
Many ISPs block outbound port 25 on home connections to curb spam. Port 25 is for server-to-server delivery; mail apps use 465 or 587.
Can I send newsletters over SMTP?
Technically yes, but shared hosting caps how many messages you can send per hour. For large mailings, use a dedicated email marketing service.