An intermediate host that acts as either an SMTP relay or as a gateway into some other transmission environment is usually selected through the use of the domain name service (DNS) Mail eXchanger mechanism.
Usually, intermediate hosts are determined via the DNS MX record, not by explicit "source" routing (see section 5 and appendices C and F.2).
When an e-mail message is sent through the Internet, the sending mail transfer agent makes a DNS query requesting the MX record for the recipient's domain name, which is the portion of the e-mail address following the "@".