Internet Knowledge Base | Affordable Web Hosting Plans | Cheap Domain Name Registration

How Mail Server Works

Page 2 : Procedures of Sending and Receiving Emails

The sending and receiving emails are simple but quite interesting. Let’s use an example to discuss how emails are sent and received.

Suppose William use Netscape Mail to send an email to us. Our email address is Then we will also use Netscape Mail to receive the email from the mail box.

Email Clients Configuration of Sender and Receiver

The following are the setting of Email Clients of both sender and receiver:

Configuration of Netscape Mail Email Client of William:

Name : william
Email Address:
SMTP Server :
SMTP Server User Name : william123
POP3 Server :
User Name : william
Password : 1234

Email Contents William Send to Us:

I like to sign up your service. Your service is great!

Our Netscape Mail Email Client Configuration:

Name : Alex
Email Address:
SMTP Server :
POP3 Server :
POP3 Server User Name : general
Password : 9999

Procedures of Sending Email and Receiving Email

The following diagram shows the procedures that email sending from William (Sender) to (Receiver).

how mail server works

We will discuss the procedures of Out-going email and In-coming email one by one.

Out-going Email Procedures:

When William composed the above email and click on the ‘Send’ button, the email begins it's long journey:

  1. The Netscape Mail email client of William will contact and connect with Port 25 of configured SMTP Server ( at once.
  2. The Netscape Mail inform Server the information of sender and receiver.
  3. confirm correct sender information, receive the email, put it in the 'Awaiting Out-Going Mails' list, and waiting to send out.
  4. Suppose there are 100 emails awaiting to deliver in the server. Therefore the email William send to us is in the 101 position of the waiting list.
  5. The server is very busy in sending out the emails in the waiting list. 100, 99, 98, 97, …… 5, 4, 3, 2, 1. Okay! It’s time to send out the William's email.
  6. The server is now handling the email of William. Firstly, the server will break the receiver email address ( into two parts:
    receiver email account name – general
    receiver domain name –
  7. The domain name ( is for human use only. The computer must get the IP address of’s SMTP Server ( In order to get the IP address of, the must first contact Domain Name Server and query the IP address of Server.
  8. The Domain Name Server reply the IP address of to Server.
  9. Now server has the IP address of server, it can start sending the email.
  10. The server now connect with the communication port 25 of, and informing that an email is going to send to him.
  11. The server confirm that 'general' is one of the email account under Then it passes the email to POP3 server.
  12. The POP3 server open the ‘general’ email account (general.txt), and append the contents of email to the end. The situation is like:
    From : xxxxxx
    To : general
    Subject : The 20th Email
    From : William
    To : general
    Subject : Sign Up
    I like to sign up your service.
    Your service is great!

Up to now, the email that William sent to us has been arrived at our mail box. The procedures of out-going email is also finished.

Now let's discuss the procedures of In-coming email.

Incoming Email Procedures

The email send by William has arrived at our mail box. Let’s see how can we retrieve the email from our mail box:

  1. We constantly check if there are any new mails at our mail box. Now Alex click on the 'Receive Mail' button of Netscape Mail.
  2. The Netscape Mail email program will connect with the communication port 110 of POP3 server at once.
  3. The POP3 server will request the user name and password. If the information are correct, POP3 server will open the general.txt text file, and download all new emails to the computer of Alex. The contents of general.txt will also be cleared (Of course you can also configure to keep all the emails in general.txt).

Then the whole procedures of sending and receiving emails were completed.

Internet knowledge base