It's also known as:
- message delivery agent (MDA)
- local delivery agent (LDA)
- Mail eXchange (MX)
The email servers IP are set in the DNS via the MX record. This is how a server knows to which server a message should be sent.
- lookup the MX record for the domain name yolo.bar.com,
- connect to the corresponding email server on the port 25