Java mail sender's address displayed rather than his name
You can set a name in the InternetAddress
using
new InternetAddress("[email protected]", "Your Name");
You should use the two string constructor of InternetAddress to pass in both the e-mail address and the person's name. The resulting e-mail will contain a string like Jarrod indicated.
InternetAddress fromAddress=new InternetAddress("[email protected]", "John Doe");
How the from field is displayed is a client specific implementation detail.
Usually if the sender is in the form of "Sender Name" <[email protected]>
the client will do the correct thing depending on configuration.
Some clients will infer the name information from their address book information if it is missing.