Does any one know how to send an email with the desired "from" name in Java ?
I have a code which sends the mail through gmail. Using the smtp settings of gmail, I am able to do that. But, using the same smtp settings, can I send an email from a non-existing mail ID ?
For example: I have a code which sends an email from the existing username (say abc@gmail.com) and the receiver gets the email from abc@gmail.com . But , what I want is , can we send a mail from something like "a@def.com" ? So that, the user receives the mail from "a@def.com" ?
Is that possible ?