• Post Reply Bookmark Topic Watch Topic
  • New Topic

[JavaMail]: How to hide sender's email address?  RSS feed

 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Does anyone know how to hide the sender's email address? The JavaMail API has a setFrom() method, but it requires an InternetAddress.

Is there any workabout? I would like to just display the sender's name instead of the sender's name & email address.

Thanks.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Firstname Lastname" is a valid RFC822 email address, which is what InternetAddress's constructor requires. You should be able to use it. Remember though that to be valid it must include the double quotes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!