Email? What are you?
Photo by Miguel Á. Padriñán from Pexels
By Carla
Email – something we take for granted until it stops working. And as we have no idea how or why it works, when it stops, it can be quite a stressful affair.
Email (or electronic mail), as we know it has been around since the 1970s. There are three protocols that email uses to send and receive mails:
IMAP – Internet Mail Access Protocol
POP – Post Office Protocol
These two protocols are used when receiving mail. IMAP keeps the mails on the server whereas POP downloads the mails to the user’s computer and deletes them off the server.
SMTP – Simple Mail Transfer Protocol
Email is sent using this protocol.
Okay so we know that email uses protocols to send and receive mail. Now we need to understand where and how this happens. To understand this we need to understand the terms ‘mail server‘ and ‘DNS‘.
A mail server is a computer application. In the diagram below you will see two mail servers for both the sender and the receiver. The outgoing mail server is called the MTA (Mail Transfer Agent) and the the incoming mail server is called the MDA (Mail Delivery Agent). The outgoing server uses the SMTP protocol to relay mails between MTAs whereas the incoming mail server uses either IMAP or POP3 to relay the email to the recipient.
DNS (Domain Name System) translates between domain names and actual IP addresses. In terms of email, DNS is used to find out the mail server of the recipient. This information is retrieved from the DNS using the MX records and then the mail can be sent on to the correct mail server.
These are the steps for sending an email:
- Enter email address of recipient, write message, press send while using email application
- The email goes to the MTA (outgoing mail server) via SMTP
- DNS lookup request sent to determine the MTA of the recipient
- Response sent back containing the IP address of the recipient’s mail server
- Email is transferred between the mail servers (MTAs) using SMTP
- Email is now with the recipient’s MTA
- Email is transferred to the MDA (incoming mail server) and then the local computer using either POP3 or IMAP
Email: plenty of acronyms but really not that complicated!
Enter WordPress and the php(mail) function.
Next time we will talk about why WordPress and email have a tendency not to play nicely.