Professional Documents
Culture Documents
191105082_MCN_Exp10
191105082_MCN_Exp10
EXPERIMENT 10
SMTP is an application layer protocol. The client who wants to send the mail opens a
TCP connection to the SMTP server and then sends the mail across the connection. The
SMTP server is an always-on listening mode. As soon as it listens for a TCP connection
from any client, the SMTP process initiates a connection through port 25. After
successfully establishing a TCP connection the client process sends the mail instantly.
The second argument – TCP Port. (Just a number representing which application to run
on a server. For example, HTTP runs on port 80. Port number can be from 0 to 65535)
Closing the connection - The socket connection is closed explicitly once the message to
the server is sent.
1. Composition of Mail
Initially, the sender composes an e-mail message with the help of a Mail User Agent
(MUA) and then transmits the e-mail. MUA helps in sending and receiving mail. The
email message consists of two parts, namely the body and the header. The body
comprises the main portion of the message, while the header comprises the subject,
which is a one-line description of what the body holds and the sender and recipient
address information.
After the document’s structure is complete, the customer utilizes the Simple Mail
Transfer Protocol and sends the completed document to the server on TCP channel 25.
3. Delivery of Mail
E-mail addresses contain the recipient’s username and the domain name. For example,
in abc@gmail.com, “abc” is the username of the receiver and “gmail.com” is the
domain name. If the recipient”s domain name is different from the sender’s domain
name, then MSA will send the letter to Mail Transfer Agent (MTA). To transmit the
email, the MTA searches for the target domain. It looks in the Domain Name
System (DNS) to find the target domain. Once the record is found, MTA connects to
the server to transmit the message.
After the server receives the message, it sends it to the Mail Delivery Agent (MDA),
which keeps the e-mail until the user retrieves it.
The email stored in the MDA is retrieved by logging into the MUA with the help of a
username and password of the MUA.
OUTPUT:
OUTPUT:
CONCLUSION: The TCP/IP and SMTP protocols were successfully implemented using
Java.