What's the difference between an MUA and an MTA?
An MUA is a mail user agent - this is a program that allows a user to read, compose, and send e-mail. Examples of MUAs are Eudora, pine, Netscape Mail, and Microsoft Outlook. If your program uses the JavaMail API to send e-mail, it is acting as an MUA.
There are typically multiple applications on each computer that can act as an MUA; each user typically runs an MUA directly. You can think of an MUA as an e-mail client.
There will typically be at most one MTA on a machine. More likely, a large number of users will use the same MTA. For example, you probably send e-mail using your ISP's SMTP server. The ISPs MTA will be shared by all of that ISP's customers. You can think of an MTA as an e-mail server.