Message transfer agent (MTA)
The MTA is software running on a dedicated workstation or computer and is part of the email system’s backbone. Each MTA communicates with one or more UA’s and other MTAs. Its basic function is to accept mail from a UA or another MTA, examine it, and route it. For example, when it receives mail from a UA it verifies the format of the mail. If it is not correct it informs the UA an error has occurred so the sender can be notified. If it is correct there are two possibilities.
First, the recipient is reachable via another UA to which the MTA is connected. Example is user A sending mail to user B connected to same MTA. In this case the MTA gives the mail to the appropriate UA for delivery. Second, the UA that will deliver the mail is connected to another MTA. Here user A may have sent mail to user C connected to some other MTA. In this case the mail must be routed to another MTA. Collectively the MTAs execute a routing strategy that sends the mail through one or more MTAs until it reaches the desired one. Then the mail is sent to the appropriate UA for delivery.
The UA appends a header to a message sent from the user. If the MTA must route the mail to another MTA it also appends additional bytes to the message and header. These additional bytes are called the envelope. The envelope is used by the MTAs for routing
Its just overview of MTA you can visit page at wikipedia to know details
Message transfer agent at Wikipedia