Sending emails has become sort of a novelty in our daily lives. We accept that our emails will arrive in the desired inbox and we move on with our lives. But what’s actually happening behind the scenes to make this possible? Let’s explore mail servers.

What is a mail server?

A mail server or a message transfer agent (MTA) manages the sending and receiving of emails from one computer to another. Like clockwork, a mail server uses both email protocols and mail server software to deliver and accept emails. This process runs every time you send or receive an email and without a mail server, there would be no emails arriving into anyone’s inbox.

How do mail servers work?

A user’s ability to send and receive emails depends on mail servers, and in order to function effectively, it’s essential that this type of server is using mail server software. Depending on your computer’s operating system there are many types of mail server software you may want to opt for, a popular example of a Windows mail server software is the Microsoft Exchange Email Server. This software allows a user to manage and add email accounts to the server, which can then get to work sending and receiving mail to these accounts.

A messaging system is then created between mail servers and other programs, such as Microsoft Outlook or Gmail, in order to move emails between computers. If you were to send an email from your Gmail account, Gmail would be responsible for forwarding your email over to a mail server. The mail server would then forward your email to another mail server to be sent to the desired recipient.

Still with us?

What are mail server protocols?

We briefly explained above how mail servers work, but there’s an extra process behind the scenes managing your emails. Mail servers also use email protocols when sending or receiving emails. There are three protocols in question: Simple Mail Transfer Protocol (SMTP), Post Office Protocol 3 (POP3), and Internet Message Access Protocol (IMAP).

The SMTP protocol deals with the sending of outgoing mail, whilst the POP3 and IMAP protocols handle the receiving of incoming mail. Next time you send an email, or one lands in your inbox, these are the protocols working hard to make sure your email runs smoothly.

The step by step process of sending an email

Now that we know the basics of mail servers, and the different protocols they use, we’re going to run through how an email is sent. In this instance SMTP will be used, but the process of receiving an email is very similar – POP3 and IMAP would be used instead.

Step one: Sending your email

So, you’ve written your email, and you’ve attached any files you need to be sent across, so you hit send. Now it’s time for your mail server to get to work. Using your email application, whether that’s Outlook or Gmail, your mail server will access the email protocol SMTP.

Step two: Passing over your details

Once your mail server application has contacted your SMTP, your email will be passed over, including the address it needs to be sent to, and the contents of the email.

Step three: Processing the recipient

At this point, it’s important to mention that if you’re sending an email to yourself, then the SMTP will pass your email straight over to your POP3 or IMAP email protocols, as these deal with incoming messages. However, if you’re sending an email to someone else, the SMTP will need to get in touch with the other user’s mail server in order to send across the email.

Step four: Finding the recipient’s mail server

Your SMTP will now communicate with the DNS in order to find your recipient’s IP address, which is needed to send across the email. Once this number has been received, your SMTP can then contact your recipient’s SMTP.

Step five: Your email arrives in their inbox

When your recipient’s SMTP has accepted the incoming email, it’ll then pass it onto their POP3 or IMAP email protocols to be received as an incoming email. Emails normally wait in a queue until their email application, such as Gmail, allows it to be downloaded, and then it appears in the inbox.

If you've still not had enough of all things email, why not take a look at our email hosting? It's a fantastic way to take your small business to the next level of professionalism. Or, if you still have questions, talk to our sales team.