How email works ?
Once you compose an email on your computer, using an email client like Outlook ,you address it to email@example.com, and press Send.
Your email program sends your mail to the SMTP server where your account is.
The SMTP server breaks the address firstname.lastname@example.org into two parts: someonelse (the account name) and theirdomain.com (the domain). The SMTP server then contacts a DNS (domain name service) server, and asks for the IP address where theirdomain.com is located.
The DNS server sends the address back to the SMTP server.
The SMTP server then sends the email message to the SMTP server where theirdomain.com is located.
The second SMTP server delivers the email message to someonelse’s account on the POP3 or IMAP server.
Someonelse logs on to their computer and opens their email client. Their email client requests the POP3 or IMAP server to send all email from their account to their computer.
If you are sending email to someone whose account resides on the same set of mail servers, the SMTP server will simply direct the mail to the local POP3 or IMAP server, where it will be delivered to the appropriate account.