FTP vs SMTP | difference between FTP and SMTP
This page on FTP vs SMTP describes difference between FTP and SMTP. Also refer FTP vs HTTP which mentions difference between FTP and HTTP.
FTP
FTP stands for File Transfer Protocol. It is used to send/receive file from the remote computer. It is defined in RFC959. FTP establishes two connections between client system and server system, one for control information and the other for data to be transfered. Control information carry commands/response. Authentication need to be done initially by way of validating username and password. Once it is done files can be transferred between two systems. FTP handles both binary and text format files.
SMTP stands for Simple Mail Transfer Protocol. SMTP provides a protocol for two computers to exchange electronic mail usign a TCP connection. In other words, it is the protocol used by e-mail servers to forward messages across the TCPIP network. The client computer which usually initiates the e-mail message uses the SMTP to send the e-mail to the local server delivery. It is defined in RFC821,RFC822 and RFC974.
As mentioned SMTP communicates with the network via TCPIP protocol stack. SMTP communication occurs through TCP port 25 on SMTP server.
The communication between client and server in the SMTP process consists of about 4 character commands from client to the server and 3 digit response codes from the server to the client as mentioned below in the table. SMTP server response codes are very important in case there is some problem to debug it further from networking point of view.
As we know now that main difference between FTP and SMTP is that with FTP user can send and receive file to and from the computer, While SMTP is used to deliver the mail to the user's mail box configured in the e-mail server.
SMTP Response codes
SMTP response Code | Description |
---|---|
221 | Domain service closing the transmission channel |
250 | Requested action completed successfully |
450 | Action was not taken because mailbox is busy |
500 | Syntax error: command not recognized |
501 | Syntax error: problem with parameters or arguments |
550 | Action was not taken because mailbox was not found |
551 | User is not local, try sending the message to PATH |
554 | TRANSACTION FAILED |
Other useful difference between FTP and SMTP protocols are mentioned in the following table:
Feature | FTP | SMTP |
---|---|---|
TCP port number | 20 and 21 | 25 |
RFC reference documents | RFC959 | RFC821, RFC822 and RFC974 |
Protocol function | Used to transfer files from remote computer after connection is established | Used to e-mail send messages between computers. This is done either using SMTP server or using mail function. |
Following links help one understand difference between HTTP and SMTP also.
FTP, TFTP, HTTP RELATED LINKS
Basics of OSI and TCPIP layers
Networking tutorial
FTP vs HTTP
FTP vs TFTP
What is Difference between
difference between FDM and OFDM
Difference between SC-FDMA and OFDM
Difference between SISO and MIMO
Difference between TDD and FDD
Difference between 802.11 standards viz.11-a,11-b,11-g and 11-n
OFDM vs OFDMA
CDMA vs GSM
Bluetooth vs zigbee
Fixed wimax vs mobile