Explain working of SMTP in mail
Answer:-
SMTP:
▫ SMTP, defined in RFC 5321, is at the heart of Internet electronic mail. As mentioned above, SMTP transfers messages from senders’ mail servers to the recipients’ mail servers.
▫ SMTP is much older than HTTP
To illustrate the basic operation of SMTP, let’s walk through a common scenario.
Suppose Alice wants to send Bob a simple ASCII message.
- Alice invokes her user agent for e-mail, provides Bob’s e-mail address (for example, bob@someschool.edu ), composes a message, and instructs the user agent to send the message.
- Alice’s user agent sends the message to her mail server, where it is placed in a message queue.
- The client side of SMTP, running on Alice’s mail server, sees the message in the message queue. It opens a TCP connection to an SMTP server, running on Bob’s mail server.
- After some initial SMTP handshaking, the SMTP client sends Alice’s message into the TCP connection.
- At Bob’s mail server, the server side of SMTP receives the message. Bob’s mail server then places the message in Bob’s mailbox.
- Bob invokes his user agent to read the message at his convenience.