How do mail servers work?
How do mail servers know where to send your mail?
Mail servers are often described as electronic post offices. They receive, sort and deliver your email and attachments to the address the sender specifies.
Each and every hosting provider and ISP(Internet Service Provider) will be running a mail server program on each of their servers. As soon as you click “Send” on your completed email. Your hosting provider (or ISP depending on your outgoing server settings) will receive your email request.
The first step is to find out where your email is going to, obviously this is obtained through the destination email address you have entered.
From the destination email address the mail server will take out the domain name (e.g xmmailserver.com in our case)
From this domain name the mail server can now obtain a destination IP address. Every domain name that can accept email has an IP address record called an MX record. This tells the mail server which IP address to send the email to.
This destination server will be another hosting companies or ISP’s mail server which in turn will take the mail, find the matching mail account and place the mail into the correct mailbox based on the destination email address.