What Is SMTP (Simple Mail Transfer Protocol) Used For?

SMTP stands for Simple Mail transfer protocol and it is a protocol used for the sending of mails from one client to another over the internet.

This protocol is used in two stages, one is from the client sending the mail to the sender server and from this server to another server close to the recipient of the mail. smtp for mail transfer The email can then be retrieved by the client receiving the email from the server using the POP3 or IMAP protocol.

The protocol SMTP uses is the Transmission Control Protocol (TCP). TCP is a connection oriented protocol that ensures the successful delivery of packets and has an error-checking feature.

SMTP uses commands and responses to transfer messages between a Message Transfer Agent (MTA) client and an MTA server.

The SMTP consists of 14 commands and they are;

s/nKeywordArgument(s)
1HELOSender’s host name
2MAIL FROMSender of the message
3RCPTTOIntended recipient of the message
4DATABody of the mail
5QUIT
6RSET
7VRFYName of recipient to be verified
8NOOP
9TURN
10EXPNMailing list to be expanded
11HELPCommand name
12SEND FROMIntended recipient of the message
13SMOLFROMIntended recipient of the message
14SMALFROMIntended recipient of the message

The responses are sent from the SMTP server to the client and each response consists of a three digit code.

Positive Completion Reply

CodeDescription
211System status or help reply
214Help message
220Service ready
221Service closing transmission channel
250Request command completed
251User not local; the message will be forwarded

Positive Intermediate Reply

CodeDescription
354Start mail input Transient

Negative Completion Reply

CodeDescription
421Service not available
450Mailbox not available
451Command aborted: local error
452Command aborted: insufficient storage

Permanent Negative Completion Reply

CodeDescription
500Syntax error; unrecognized command
501Syntax error in parameters or arguments
502Command not implemented
503Bad sequence of commands
504Command temporarily not implemented
550Command is not executed; mailbox unavailable
551User not local
552Requested action aborted; exceeded storage location
553Requested action not taken; mailbox name not allowed
554Transaction failed

T|he first digits (2,3,4 and 5) in the response digit is used to define different category.