Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Computer Networks  >  SMTP : Simple Mail Transfer Protocol

SMTP : Simple Mail Transfer Protocol | Computer Networks - Computer Science Engineering (CSE) PDF Download

SMTP –Simple Mail Transfer Protocol
Next we look at SMTP- the protocol used to transfer messages from one host to another. To place SMTP in the right context, we need to identify the key players. First, users interact with a mail reader when they compose ,file ,search, and read their email. There are countless mail readers available ,just like there are many web browsers now include a mail reader. Second ,there is a mail daemon running on each host. You can think of this process as playing the role of a post office :mail readers give the daemon messages they want to send to others users, the daemon uses SMTP running over TCP to transmit the message into a daemon running on another machine, and the daemon puts incoming messages into the user‟s mailbox. Since SMTP is a protocol that anyone could implement , in theory there could be many different implementations of the mail daemon. It runs out, though that the mail daemon running on most hosts is derived from the sendma il program originally implemented on berkely u nix.

SMTP : Simple Mail Transfer Protocol | Computer Networks - Computer Science Engineering (CSE)

While it is certainly possible that the sendmail program on a s ender‟s machine establishes an SMTP/TCP connection to the sendmail program on the recipient‟s machine, in many cases the mail traverses o ne or more mail gateways on its route from the sender‟s host to the receiver‟s host. Like the end hosts, these gateways also run a send-mail pr ocess. It‟s not an accident that these intermediatee nodes are called “gateways” since their job is to store and forward email messages.

Mail Reader:
The final step is for the user to actually receive her messages from th e mail box, read them ,reply to them, and possib ly save a copy for future reference .The user performs all the actions by interacting with a ma il reader. In many cases ,this reader is just a pro gram running on the same machine as the user‟s mailbox resides, in which case it simply reads and writes the file that implements the mailbox .I n other cases ,the user accesses her mailbox from a remote machine using yet another protocol, such as the Post Office Protocol(POP ) or the Internet Message Access Control(IMAP).It is beyond the scope of this book to discuss the user interface aspects of the mail reader but it is definitely within our scope to talk about the access protocol. We consider IMAP, in particular.

IMAP is similar to S MTP in many ways .It is a client/server protocol running over TCP, where the client (running on the user‟s desktop machine) issues commands in the form of <CRLF> terminated ASCII text lines and the mail server(running on the machine that maintains the user‟s mailbox) responds in-kind. The exchange begins with the client authenticating herself, an d identifying the mailbox she wants to acc ess. This can be represented by the simple state tr ansaction diagram shown in the figure. In this d iagram, LOGIN, AUTHENTICATE, SELECT, EXAMINE, CLOSE and LOGOUT are exampl e commands that the client can issue, while OK is one possible server response. Other common c ommands include FETCH, STORE, DELETE, an d EXPUNGE, with the obvious meanings. Additional server responds include NO (client d oes not have permission to perform that operation) and BAD (command is ill-formed).

When the user asks to FETCH a message, the server returns it in MIM E format and the mail reader decodes it. In addition to the message itself, IMAP also defines a set of message attributes that are exchanged as part of other commands, independent of transfer ring the message itself. Message attributes include information like the size of the message, but more interestingly, various flags associated with a message, such as Seen, Answered, Deleted and Recent. These flags are used to keep the client and server synchronized, that is, when the user deletes a message in the mail reader, the client needs to report this fact to the mail server. Later, should the user decide to expunge all deleted messages, the client issues an EXPUNGE command to the server, which knows to actually remove all earlier deleted messages from the mail box.

Finally, note that when the user replies to a message,or sends a new message, the mail reader does not forward the message from the client to the mail server using IMAP ,but it instead uses SMTP .This means that the user‟s mail server is effectively the first mail gateway traversed along the path from the desktop to the recipient‟s mail box.

TCP/IP protocol suite specifies a standard for the exchange of mail between machines. It was derived from the (MTP) Mail Transfer Protocol. it deals with how the underlying mail delivery system passes messages across a link from one machine to another. The mail is enclosed in what is called an envelope. The envelope contains t he To and From fields and these are followed by the mail . The mail consists of two parts namely the Header and the Data. The Header has the To and From fields. If Headers are defined by us they should start with X. The standard headers do not start with X. In SMTP data portion can contain only printable ASCII characters The old method of sending a binary file was to send it in uuencoded form but there was no way to distinguish between the many types of binary files possible eg. .tar , .gz , .dvi etc.

The document SMTP : Simple Mail Transfer Protocol | Computer Networks - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Computer Networks.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
21 videos|113 docs|66 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on SMTP : Simple Mail Transfer Protocol - Computer Networks - Computer Science Engineering (CSE)

1. What is SMTP and how does it work?
Ans. SMTP stands for Simple Mail Transfer Protocol and it is a communication protocol used for sending and receiving email messages. It works by establishing a connection between the email client and the mail server, and then transferring the email from the sender's mail server to the recipient's mail server through a series of commands and responses.
2. What are the advantages of using SMTP for email communication?
Ans. The advantages of using SMTP for email communication include: - Reliability: SMTP ensures the reliable delivery of email messages by using error detection and correction mechanisms. - Compatibility: SMTP is a widely accepted standard protocol, making it compatible with various email clients and servers. - Scalability: SMTP can handle a large volume of email traffic, making it suitable for organizations of all sizes. - Security: SMTP supports encryption protocols like SSL and TLS, ensuring secure transmission of sensitive information. - Flexibility: SMTP allows for the integration of other protocols and services, such as spam filtering and email forwarding.
3. Can I use SMTP for sending emails from my personal computer?
Ans. Yes, you can use SMTP for sending emails from your personal computer. However, you would need to configure an email client or software that supports SMTP, such as Microsoft Outlook or Mozilla Thunderbird, and provide the necessary SMTP server settings (including the server address, port number, and authentication credentials) provided by your email service provider.
4. What are some common issues that can occur with SMTP?
Ans. Some common issues that can occur with SMTP include: - Email delivery failures: SMTP may encounter delivery failures due to incorrect recipient addresses, network issues, or the recipient's mail server being unavailable. - Spam filtering: SMTP messages can be flagged as spam by recipient mail servers, leading to them being placed in the recipient's spam folder or rejected altogether. - SMTP server blacklisting: If an SMTP server is found to be sending spam or engaging in malicious activities, it can get blacklisted by other mail servers, resulting in email delivery issues. - Authentication problems: SMTP authentication may fail if the provided login credentials are incorrect or if the server does not support authentication. - Connection timeouts: Slow or unstable internet connections can cause SMTP connections to time out, resulting in failed email transmission.
5. Are there any alternatives to SMTP for sending emails?
Ans. Yes, there are alternative protocols to SMTP for sending emails, such as: - IMAP (Internet Message Access Protocol): IMAP is primarily used for receiving emails but can also be used for sending messages. It offers more advanced features like email synchronization across multiple devices. - POP3 (Post Office Protocol version 3): POP3 is mainly used for retrieving emails from a mail server but can be used for sending messages as well. It is a simpler protocol compared to SMTP and is often used by standalone email clients. - Web-based email interfaces: Many email service providers offer web-based interfaces, which allow users to send and receive emails directly through their web browsers without the need for configuring SMTP settings. Examples include Gmail, Yahoo Mail, and Outlook.com.
21 videos|113 docs|66 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

mock tests for examination

,

Exam

,

Free

,

past year papers

,

Objective type Questions

,

SMTP : Simple Mail Transfer Protocol | Computer Networks - Computer Science Engineering (CSE)

,

MCQs

,

Viva Questions

,

pdf

,

Summary

,

Semester Notes

,

study material

,

Important questions

,

practice quizzes

,

ppt

,

SMTP : Simple Mail Transfer Protocol | Computer Networks - Computer Science Engineering (CSE)

,

shortcuts and tricks

,

Extra Questions

,

SMTP : Simple Mail Transfer Protocol | Computer Networks - Computer Science Engineering (CSE)

,

video lectures

,

Sample Paper

,

Previous Year Questions with Solutions

;