SMTP (Simple Mail Transfer Protocol) is a TCP/IP protocol used in sending and receiving e-mail. However, since it is limited in its ability to queue messages at the receiving end, it is usually used with one of two other protocols, POP3 (Post Office Protocol) or IMAP (Internet Message Access Protocol), that let the user save messages in a server mailbox and download them periodically from the server. In other words, users typically use a program that uses SMTP for sending e-mail and either POP3 or IMAP for receiving e-mail.
How SMTP works
SMTP works as a three-step process, using a client/server model. First, an e-mail server uses SMTP to send a message from an e-mail client, such as Outlook or Gmail, to an e-mail server. Second, the e-mail server uses SMTP as a relay service to send the e-mail to the receiving e-mail server. Third, the receiving server uses an e-mail client to download incoming mail via IMAP and place it in the inbox of the recipient.
SMTP vs. IMAP
Hosted on an SMTP server, SMTP is used to send, relay or forward messages from a mail client, but cannot receive messages.
On the other hand, IMAP is an e-mail protocol that deals with managing and retrieving e-mail messages. IMAP keeps an email on a server, and then synchronizes it across several devices. IMAP is used in receiving emails, not sending them.
When used together, SMTP and IMAP transmit email messages.
SMTP vs. HTTP APIs
SMTP has been used since 1982 and remains the most common e-mail protocol to send an e-mail message nearly four decades later. However, there has been a trend toward using cloud-based HTTP APIs to send and receive e-mail.
HTTP APIs offer two advantages: The communication between e-mail client and server (for example, when using mobile apps) is faster than SMTP because HTTP APIs require fewer back-and-forth commands to authenticate the sender and recipient. Additionally, APIs offer functionality that is not available using SMTP.
SMTP and Unix-based systems
On Unix-based systems, sendmail remains the most widely used SMTP mail server for e-mail. Sendmail provides the-behind-the-scenes e-mail transport and is typically used with a separate user-friendly interface.
SMTP usually is implemented to operate over Internet port 25. An alternative to SMTP that is widely used in Europe is X.400/X.500. When it was created, X.400 was intended to serve as the primary international protocol. Among most users, X.400/X.500 has been eclipsed by SMTP, but it remains popular in the defense and telecommunications industries.