Email (acronym for electronic mail), as we all appreciate, is now the most prevalent mode of business and personal communication. Having an email address is now as important as having a phone number. You need to have at least one email address for smooth existence in today’s electronically connected world. Whether you need to get your passport made, or get a driving license, or open a bank account, or buy a personal or vehicle insurance, every where you are required to provide your email address in addition to your phone number and postal address.
Therefore, we all possess at least one email address. Those who are working for a company, would have an additional official email address provided by their employer. Thus, it is quite common these days for people to be owning two or more email addresses. Hence, there is a need to understand how you can conveniently and efficiently organize and manage all your email accounts.
An email address can be obtained from any hosting company or a free email provider such a gmail, yahoo, hotmail, and the like. They usually provide you two methods in which you can access (i.e., send, receive, & manage) your emails stored on their servers in your email account. These two methods fundamentally differ in the communication protocol sets employed.
IMAP is a communication protocol used to enable a computing device (such as desktop, laptop, tablet, or smart phone) to connect with an email server and access a mail box, i.e., view all folders, view list of emails in each folder, open a specific email and view it’s contents, reply to a received email, compose and send out new email, etc.
All this is done while everything resides on the mail server. You can even create new folders, rename existing folders, assign importance flags to specific emails, etc. - all such changes are effected on the mail server itself. You device only acts as an interface.
There are two ways in which you can access your email server using the IMAP protocol.
Webmail is a very popular access method. You can access your email account directly from your web browser by typing your mail service URL (e.g. mail.google.com) and logging into your mail server via a browser interface known as Webmail.
A typical webmail interface would look somewhat like the one shown below:
The webmail system connects you to your mail server via the IMAP communication protocol. This protocol provides for a format of communication using which your mail server communicates with your webmail interface to deliver a snapshot of your entire mail box - with all your emails organized into multiple folders. The emails remain stored on your email server itself - you are only presented a snapshot or a current copy.
When you compose a new mail from your webmail interface, or reply to a received email, another communication protocol comes into play and is known as SMTP (acronym for Simple Mail Transfer Protocol). Your outgoing email is routed through your mail server to the recipient’s mail server via SMTP. Your mail server keeps a copy of outgoing email in an appropriate folder, commonly labeled as Sent folder, so that you can refer to it in future.
The figure below illustrates where IMAP & SMTP protocols are used:
Webmail has the advantage that you can access your email account and view all your emails from any computer and any location. Frequent travelers, who may not always carry their personal laptop with them, find the webmail feature quite useful. Even when you are not traveling, you may have set up email access on multiple devices such as your laptop and your smart phone, and may be accessing your emails from both of these devices on a daily basis.
Accessing emails via webmail becomes more desirable especially for companies where one mail box is required to be accessed by more than one employee. For example, email@example.com may be accessed by multiple sales persons from their own devices; or firstname.lastname@example.org may be accessed by multiple support staff working in different shifts. This is desired due to the need to maintain continuity in communicating with customers without being dependent on one staff.
When you access via webmail, your mails are visible only as long as you are connected to the internet and logged in to your email account. However, modern version of IMAP allows you to set up your phone for a direct IMAP connection (and not through the web browser’s webmail interface), so that once you have accessed your emails, a copy gets downloaded and stored in your phone enabling you to view them offline. This is particularly desirable when accessing your mail box from your phone, and nearly all smart phones these days have an email app that allows it.
A typical email app interface would look somewhat like the one shown below:
It is advisable to always set up your phone to use the email app and not webmail, as it is far more conventient. You do not need to open a browser, type in the email service url, login, and then view your emails. You can simply open the email app from your home screen, it logs you automatically and presents to you your mail box or set of mail boxes. It may be noted that you can configure multiple email accounts within the same email app.
The IMAP protocol provides light-weight connection to your mail server from devices that may be connected to the internet via a slow network connection (such as your phone). At the same time when you are accessing from your desktop that may be connected to high speed internet, you can gain full access. To do this IMAP allows you to configure your slow device to only show the textual part of an email and not download the attachments (until your explicitly do so by clicking at attachment link).
When you are on the move, you would only like to quickly see if you have received any important email, and download attachments selectively, thus keeping your phone bandwidth consumption within limits and your phone bill in check especially when you are roaming abroad - as international roaming charges are usually quite high.
IMAP also allows you to quickly download only the list of received emails with their basic headers and fetch more information on demand by clicking at a particular email in the list.
Connection from multiple devices or by multiple users (as long as they all share the access credentials) is supported by the IMAP protocol. When connected via email app, the app maintains the state of accessed mail box independently in each device
POP is an older communication standard (as compared to IMAP) for receiving email messages from an email server to a local email client. The version that is in use today is version 3, and hence this protocol is often referred as POP3.
POP3 provides a second method of accessing emails where you connect to your email server via a local email client such as MS-Outlook, Windows Live Mail, Apple Mail, or Mozilla Thunderbird. These email clients are applications that are installed in your local computer like any other desktop software. Even the email apps installed in smart phones, that we mentioned about earlier, can be configured to connect your phone to your email server via POP3.
Due to different advantages of IMAP & POP3, both protocols continue to exist.
The advantage with POP3 is that you are able to download a copy of all your received emails (along with attachments) into your own personal computer and can therefore view the emails offline as well. There is also a provision to automatically remove emails from the server after they are downloaded into your local machine. This helps manage your hosting space efficiently.
For sending out emails your local email client uses SMTP to communicate with the mail server. A copy of all sent out emails is stored in your own computer.
The figure below illustrates where POP3 & SMTP protocols are used:
Both IMAP and POP3 clients allow you to set up multiple email accounts (they can even be from different providers) on the same email client. For example, you can have email@example.com (your official email address) and firstname.lastname@example.org (your personal email address), both on the same email client making it easy for you to access them both together. This can also be very useful for small business owners, who can, for example, access email@example.com, sales&mycompany.com, and firstname.lastname@example.org, all from the same email client.
Further, email clients allow you to set up a different signature for each email account, so that when you reply from a particular email account, its signature gets included in the reply email and reply is sent using SMTP credentials of the particular email account.
The SMTP protocol is used by an email client to connect to a remote smtp server and send out emails. The protocol also support authentication before sending. The remote smtp server, in turn, also communicates with the destination mail server (i.e. the smtp server on the destination host) via SMTP protocol.
Nearly all hosting companies that you buy email service from, give you access to communicating to their email servers via IMAP, POP3 & SMTP. However, if you are using a free email service, you may not have POP3 & SMTP access and may be limited to use only the webmail interface provided by the free email provider.
The configuration details for setting up your email client are provided by the email provider. They can be normally viewed by logging into your webmail account. Typically you require login credentials, which is your email address and password. Additionally, you need to know the addresses of your imap, pop3 & smtp servers.
Typical server addresses could be of the form imap.yourdomainname.com, pop.yourdomainname.com and smtp.yourdomainname.com. Or, simply mail.yourdomainname.com - a single mail server that handles all 3 protocols.
You also need to know the communication ports used by these 3 types of protocols. The ports are identified by assigning them a unique number, known as port number. A port number identifies a communication end-point (hardware interface) on which email server listens for request for service. Usually for every protocol of communication, email servers provide a port for plain text access, and another for secure access (i.e. via encrypted data transfer).
All email servers use a standard port number for each function, so the world knows the port number to connect to for a particular service.
Typical port numbers for SSL (secure encrypted communication) and non-ssl (plain text communication) access are as below:
|Protocol||SSL Port||Non-SSL Port|
|SMTP||465||25, or 587|
An alternate port no. of 587 is provided for plain text smtp as most ISPs block port 25 due to it being insecure. Port 587 provides more security by allowing explicit TLS connection. However, it is flexible to even accept plain text connection.
If you do not have a wild-card SSL certificate installed for your domain, you will not be able to have your email client access your mail server using the secure ports. To overcome this problem, and enable you to connect securely, your hosting provider would normally provide you a canonical name for the servers, such as imap.mailhostbox.com, pop.mailhostbox.com, and smtp.mailhostbox.com. These sub-domains are SSL enabled and hence you can use the SSL ports to connect to them.
I hope this article would have helped understand the email communication protocols and the various ways in which you can effectively use your email service.
How to move your Email accounts from one hosting provider to another without losing any mails?
How to resolve the issue of receiving same email message multiple times when using Outlook?
Self Referential Data Structure in C - create a singly linked list
Mosquito Demystified - interesting facts about mosquitoes
Elements of the C Language - Identifiers, Keywords, Data types and Data objects
Moving Email accounts from one cPanel server to another
How to pass Structure as a parameter to a function in C?
Rajeev Kumar is the primary author of How2Lab. He is a B.Tech. from IIT Kanpur with several years of experience in IT education and Software development. He has taught a wide spectrum of people including fresh young talents, students of premier engineering colleges & management institutes, and IT professionals.
Rajeev has founded Computer Solutions & Web Services Worldwide. He has hands-on experience of building variety of websites and business applications, that include - SaaS based erp & e-commerce systems, and cloud deployed operations management software for health-care, manufacturing and other industries.