Sendmail vs SMTP

SMTP is the Simple Mail Transfer Protocol, a standard email protocol used to send email between mail servers. The protocol was created in 1982 and is an Internet standard. SMTP was created as a successor to the Post Office Protocol (POP) which was used in the 1970s. SMTP is used to exchange email between servers and other mail transfer agents. The standard protocol uses port 25 and is commonly used by ISPs to relay mail between servers. SMTP is used by mail servers to send messages to each other, and then to a recipient's inbox. Sendmail is a mail transfer agent that is used to send messages. It is an open-source email server that uses the Internet Message Access Protocol (IMAP) to connect to an email server. Sendmail was developed in 1979 by Eric Allman and was originally designed for Unix-based systems. Sendmail is a popular option for email servers because it is easy to configure and offers many features.

Sendmail vs SMTP

SMTP is the protocol that is used by nearly all Internet hosts to send mail. This protocol is spoken by sendmail. Sendmail determines where to send your message and how.

Some mail programs (most, today) will connect directly to a mail server and speak SMTP to it. However, the "traditional" method - and arguable the better method - is to let sendmail do it.

There are two reasons for this: 1) nearly every program in UNIX that does what sendmail does is designed to be a drop-in replacement (this includes Postfix and Exim for instance); and 2) sendmail or its replacement was designed to handle mail and nothing else - by using sendmail you don't have to design a SMTP client.

The Mutt email client for UNIX is one email client that still refuses to talk SMTP directly to a mail server; a good (technical) description is on the wiki.

If you have a choice (on UNIX anyway) of talking SMTP directly or using sendmail,  use sendmail - especially on servers.