An email client, email reader or, more formally, message user agent (MUA) or mail user agent is a
computer program
A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
used to access and manage a user's
email
Electronic mail (usually shortened to email; alternatively hyphenated e-mail) is a method of transmitting and receiving Digital media, digital messages using electronics, electronic devices over a computer network. It was conceived in the ...
.
A
web application
A web application (or web app) is application software that is created with web technologies and runs via a web browser. Web applications emerged during the late 1990s and allowed for the server to dynamically build a response to the request, ...
which provides message management, composition, and reception functions may act as a
web email client, and a piece of
computer hardware
Computer hardware includes the physical parts of a computer, such as the central processing unit (CPU), random-access memory (RAM), motherboard, computer data storage, graphics card, sound card, and computer case. It includes external devices ...
or software whose primary or most visible role is to work as an email client may also use the term.
Retrieving messages from a mailbox
Like most client programs, an email client is only active when a user runs it. The common arrangement is for an email user (the client) to make an arrangement with a remote
Mail Transfer Agent
Within the Internet email system, a message transfer agent (MTA), mail transfer agent, or mail relay is software that transfers electronic mail messages from one computer to another using the Simple Mail Transfer Protocol. In some contexts, the a ...
(MTA) server for the receipt and storage of the client's emails. The MTA, using a suitable
mail delivery agent
A message delivery agent (MDA), or mail delivery agent, is a computer software component that is responsible for the delivery of e-mail messages to a local recipient's mailbox. It is also called a local delivery agent (LDA).
Within the Internet ...
(MDA), adds email messages to a client's storage as they arrive. The remote mail storage is referred to as the user's
mailbox. The default setting on many Unix systems is for the mail server to store formatted messages in
mbox
Mbox is a generic term for a family of related file formats used for holding collections of email messages. It was first implemented in Research Unix, Fifth Edition Unix.
All messages in an mbox mailbox are Concatenation, concatenated and store ...
, within the user's
home directory
A home directory is a directory (file systems), file system directory on a multi-user operating system containing computer file, files for a given user (computing), user of the system. The specifics of the home directory (such as its name and loc ...
. Of course, users of the system can log-in and run a mail client on the same computer that hosts their mailboxes; in which case, the server is not actually ''remote'', other than in a generic sense.
Emails are stored in the user's mailbox on the remote server until the user's email client requests them to be downloaded to the user's computer, or can otherwise access the user's mailbox on the possibly remote server. The email client can be set up to connect to multiple mailboxes at the same time and to request the download of emails either automatically, such as at pre-set intervals, or the request can be manually initiated by the user.
A user's mailbox can be accessed in two dedicated ways. The
Post Office Protocol
In computing, the Post Office Protocol (POP) is an application-layer Internet standard protocol used by e-mail clients to retrieve e-mail from a mail server. Today, POP version 3 (POP3) is the most commonly used version. Together with IMAP, ...
(POP) allows the user to download messages one at a time and only deletes them from the server after they have been successfully saved on local storage. It is possible to leave messages on the server to permit another client to access them. However, there is no provision for flagging a specific message as ''seen'', ''answered'', or ''forwarded'', thus POP is not convenient for users who access the same mail from different machines.
Alternatively, the
Internet Message Access Protocol
In computing, the Internet Message Access Protocol (IMAP) is an Internet standard protocol used by email clients to retrieve email messages from a mail server over a TCP/IP connection. IMAP is defined by .
IMAP was designed with the goal of per ...
(IMAP) allows users to keep messages on the server, flagging them as appropriate. IMAP provides folders and sub-folders, which can be shared among different users with possibly different access rights. Typically, the ''Sent'', ''Drafts'', and ''Trash'' folders are created by default. IMAP features an
''idle'' extension for real-time updates, providing faster notification than polling, where long-lasting connections are feasible. See also the
remote messages section below.
The
JSON Meta Application Protocol (JMAP) is implemented using JSON APIs over HTTP and has been developed as an alternative to IMAP/SMTP.
In addition, the mailbox storage can be accessed directly by programs running on the server or via
shared disks. Direct access can be more efficient but is less portable as it depends on the mailbox format; it is used by some email clients, including some
webmail
Webmail (or web-based email) is an email service that can be accessed using a standard web browser. It contrasts with email service accessible through a specialised email client software. Additionally, many internet service providers (ISP) prov ...
applications.
Message composition
Email clients usually contain
user interface
In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine fro ...
s to display and edit text. Some applications permit the use of a program-external editor.
The email clients will perform formatting according to for
headers and
body
Body may refer to:
In science
* Physical body, an object in physics that represents a large amount, has mass or takes up space
* Body (biology), the physical material of an organism
* Body plan, the physical features shared by a group of anim ...
, and
MIME
A mime artist, or simply mime (from Greek language, Greek , , "imitator, actor"), is a person who uses ''mime'' (also called ''pantomime'' outside of Britain), the acting out of a story through body motions without the use of speech, as a the ...
for non-textual content and attachments. Headers include the destination fields, ''To'', ''Cc'' (short for ''Carbon copy''), and ''Bcc'' (''Blind carbon copy''), and the originator fields ''From'' which is the message's author(s), ''Sender'' in case there are more authors, and ''Reply-To'' in case responses should be addressed to a different mailbox. To better assist the user with destination fields, many clients maintain one or more address books and/or are able to connect to an
LDAP
The Lightweight Directory Access Protocol (LDAP ) is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed Directory service, directory information services over an Internet Protocol (IP) networ ...
directory server. For originator fields, clients may support different identities.
Client settings require the user's ''real name'' and ''email address'' for each user's identity, and possibly a list of LDAP servers.
Submitting messages to a server
When a user wishes to create and send an email, the email client will handle the task. The email client is usually set up automatically to connect to the user's mail server, which is typically either a
MSA or a
MTA, two variations of the
SMTP
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typi ...
protocol. The email client which uses the SMTP protocol creates an authentication extension, which the mail server uses to authenticate the sender. This method eases modularity and nomadic computing. The older method was for the mail server to recognize the client's IP address, e.g. because the client is on the same machine and uses internal address 127.0.0.1, or because the client's IP address is controlled by the same
Internet service provider
An Internet service provider (ISP) is an organization that provides a myriad of services related to accessing, using, managing, or participating in the Internet. ISPs can be organized in various forms, such as commercial, community-owned, no ...
that provides both Internet access and mail services.
Client settings require the name or IP address of the preferred ''outgoing mail server'', the ''port number'', and the ''user name'' and ''password'' for authentication, if any. The following ports are used for email submission:
- Port 465 – The officially designated port for mail submission using
TLS from the start of the connection (Implicit TLS), as pe
RFC 8314 Since encryption is enforced from the beginning, it eliminates the risk of downgrade attacks or MITM (Man-in-the-Middle) attacks that could strip away encryption.
- Port 587 – Commonly used for mail submission with support for
STARTTLS
Opportunistic TLS (Transport Layer Security) refers to extensions in plain text communication protocols, which offer a way to upgrade a plain text connection to an encrypted ( TLS or SSL) connection instead of using a separate port for encrypted ...
, allowing the connection to be optionally upgraded to TLS. However, if a MITM attacker interferes with the STARTTLS command, the connection may remain unencrypted, making it less secure than implicit TLS on port 465.
Port 25, originally intended for message relay between MTAs, is not for client message submission and is often blocked by ISPs to prevent spam.
Encryption
With no encryption, much like for postcards, email activity is plainly visible by any occasional eavesdropper.
Email encryption
Email encryption is encryption of email messages to protect the content from being read by entities other than the intended recipients. Email encryption may also include authentication.
Email is prone to the disclosure of information. Although man ...
enables privacy to be safeguarded by encrypting the mail sessions, the body of the message, or both. Without it, anyone with network access and the right tools can monitor email and obtain login passwords. Examples of concern include the government
censorship
Censorship is the suppression of speech, public communication, or other information. This may be done on the basis that such material is considered objectionable, harmful, sensitive, or "inconvenient". Censorship can be conducted by governmen ...
and
surveillance
Surveillance is the monitoring of behavior, many activities, or information for the purpose of information gathering, influencing, managing, or directing. This can include observation from a distance by means of electronic equipment, such as ...
and fellow wireless network users such as at an
Internet cafe
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
.
All relevant email protocols have an option to encrypt the whole session, to prevent a user's ''name'' and ''password'' from being
sniffed. They are strongly suggested for nomadic users and whenever the
Internet access provider is not trusted. When sending mail, users can only control encryption at the first hop from a client to its configured ''outgoing mail server''. At any further hop, messages may be transmitted with or without encryption, depending solely on the general configuration of the transmitting server and the capabilities of the receiving one.
Encrypted mail sessions deliver messages in their original format, i.e. plain text or encrypted body, on a user's local mailbox and on the destination server's. The latter server is operated by an
email hosting service provider, possibly a different entity than the Internet ''access'' provider currently at hand.
Encrypting an email retrieval session with, e.g., SSL, can protect both parts (authentication, and message transfer) of the session.
Alternatively, if the user has
SSH access to their mail server, they can use SSH
port forwarding
In computer networking, port forwarding or port mapping is an application of network address translation (NAT) that redirects a communication request from one address and port number combination to another while the packets are traversing a netwo ...
to create an encrypted tunnel over which to retrieve their emails.
Encryption of the message body
There are two main models for managing cryptographic keys.
S/MIME
S/MIME (Secure/Multipurpose Internet Mail Extensions) is a standard for public-key encryption and signing of MIME data. S/MIME is on an IETF standards track and defined in a number of documents, most importantly . It was originally developed by ...
employs a model based on a trusted
certificate authority
In cryptography, a certificate authority or certification authority (CA) is an entity that stores, signs, and issues digital certificates. A digital certificate certifies the ownership of a public key by the named subject of the certificate. Thi ...
(CA) that signs users' public keys.
OpenPGP
Pretty Good Privacy (PGP) is an encryption program that provides cryptographic privacy and authentication for data communication. PGP is used for signing, encrypting, and decrypting texts, e-mails, files, directories, and whole disk partit ...
employs a somewhat more flexible ''
web of trust
In cryptography, a web of trust is a concept used in PGP, GnuPG, and other OpenPGP-compatible systems to establish the authenticity of the binding between a public key and its owner. Its decentralized trust model is an alternative to the ...
'' mechanism that allows users to sign one another's public keys. OpenPGP is also more flexible in the format of the messages, in that it still supports plain message encryption and signing as they used to work before
MIME
A mime artist, or simply mime (from Greek language, Greek , , "imitator, actor"), is a person who uses ''mime'' (also called ''pantomime'' outside of Britain), the acting out of a story through body motions without the use of speech, as a the ...
standardization.
In both cases, only the message body is encrypted. Header fields, including originator, recipients, and often subject, remain in plain text.
Webmail
In addition to email clients running on a desktop computer, there are those hosted remotely, either as part of a remote UNIX installation accessible by
telnet
Telnet (sometimes stylized TELNET) is a client-server application protocol that provides access to virtual terminals of remote systems on local area networks or the Internet. It is a protocol for bidirectional 8-bit communications. Its main ...
(i.e. a
shell account
A shell account is a user account on a remote server, typically running under Unix or Linux operating systems. The account gives access to a text-based command-line interface in a shell, via a terminal emulator. The user typically communicates w ...
), or hosted on the
Web
Web most often refers to:
* Spider web, a silken structure created by the animal
* World Wide Web or the Web, an Internet-based hypertext system
Web, WEB, or the Web may also refer to:
Computing
* WEB, a literate programming system created by ...
. Both of these approaches have several advantages: they share an ability to send and receive email away from the user's normal base using a
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
or telnet client, thus eliminating the need to install a dedicated email client on the user's device.
Some websites are dedicated to providing email services, and many
Internet service provider
An Internet service provider (ISP) is an organization that provides a myriad of services related to accessing, using, managing, or participating in the Internet. ISPs can be organized in various forms, such as commercial, community-owned, no ...
s provide webmail services as part of their Internet service package. The main limitations of webmail are that user interactions are subject to the website's operating system and the general inability to download email messages and compose or work on the messages offline, although there are software packages that can integrate parts of the webmail functionality into the OS (e.g. creating messages directly from third party applications via
MAPI
Messaging Application Programming Interface (MAPI) is an Application programming interface, API for Microsoft Windows which allows programs to become email-aware. While MAPI is designed to be independent of the protocol, it is usually used to com ...
).
Like IMAP and MAPI, webmail provides for email messages to remain on the mail server. See
next section.
Remote messages
POP3 has an option to leave messages on the server. By contrast, both IMAP and webmail keep messages on the server as their method of operating, albeit users can make local copies as they like. Keeping messages on the server has advantages and disadvantages.
Advantages
* Messages can be accessed from various computers or mobile devices at different locations, using different clients.
* Some kind of backup is usually provided by the server.
Disadvantages
* With limited bandwidth, access to long messages can be lengthy, unless the email client caches a local copy.
* There may be privacy concerns since messages that stay on the server at all times have more chances to be casually accessed by IT personnel, unless
end-to-end encryption
End-to-end encryption (E2EE) is a method of implementing a secure communication system where only communicating users can participate. No one else, including the system provider, telecom providers, Internet providers or malicious actors, can ...
is used.
Protocols
Popular protocols for retrieving mail include
POP3
In computing, the Post Office Protocol (POP) is an application-layer Internet standard protocol used by e-mail clients to retrieve e-mail from a mail server. Today, POP version 3 (POP3) is the most commonly used version. Together with IMAP, i ...
and
IMAP4
In computing, the Internet Message Access Protocol (IMAP) is an Internet standard protocol used by email clients to retrieve email messages from a mail server over a TCP/IP connection. IMAP is defined by .
IMAP was designed with the goal of pe ...
. Sending mail is usually done using the
SMTP
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typi ...
protocol.
Another important standard supported by most email clients is
MIME
A mime artist, or simply mime (from Greek language, Greek , , "imitator, actor"), is a person who uses ''mime'' (also called ''pantomime'' outside of Britain), the acting out of a story through body motions without the use of speech, as a the ...
, which is used to send
binary file
A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document files ...
email attachment
An email attachment is a computer file sent along with an email message. One or more files can be attached to any email message, and be sent along with it to the recipient. This is typically used as a simple method to share documents and images.
...
s. Attachments are files that are not part of the email proper but are sent with the email.
Most email clients use a ''User-Agent''
header field to identify the software used to send the message. This header field is defined for Netnews, but not-for e-mail, and, as such, is non-standard in e-mail headers.
, ''Message Submission for Mail'', details the role of the
Mail submission agent
A message submission agent (MSA), or mail submission agent, is a computer program or software agent that receives electronic mail messages from a mail user agent (MUA) and cooperates with a mail transfer agent (MTA) for delivery of the mail. It use ...
.
, ''Email Submission Operations: Access and Accountability Requirements'', provides a survey of the concepts of MTA, MSA, MDA, and MUA. It mentions that "'' Access Providers MUST NOT block users from accessing the external Internet using the SUBMISSION port 587''" and that "''MUAs SHOULD use the SUBMISSION port for message submission.''"
, ''An Extensible Format for Email Feedback Reports'', provides "an extensible format and MIME type that may be used by mail operators to report feedback about received email to other parties."
Port numbers
Email servers and clients by convention use the
TCP port numbers in the following table. For MSA, IMAP and POP3, the table reports also the labels that a client can use to query the
SRV record
A Service record (SRV record) is a specification of data in the Domain Name System defining the location, i.e., the hostname and port number, of servers for specified services. It is defined in , and its type code is 33. Some Internet protocols su ...
s and discover both the host name and the port number of the corresponding service.
While webmail obeys the earlier HTTP disposition of having separate ports for encrypt and plain text sessions, mail protocols use the
STARTTLS
Opportunistic TLS (Transport Layer Security) refers to extensions in plain text communication protocols, which offer a way to upgrade a plain text connection to an encrypted ( TLS or SSL) connection instead of using a separate port for encrypted ...
technique, thereby allowing encryption to start on an already established TCP connection. While used to discourage the use of the previously established ports 995 and 993, promotes the use of implicit
TLS when available.
Proprietary client protocols
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
mail systems use the