This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes JavaMail: Address with white space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JavaMail: Address with white space" Watch "JavaMail: Address with white space" New topic
Author

JavaMail: Address with white space

Ezra Exposito
Ranch Hand

Joined: Apr 26, 2001
Posts: 34
I am trying to send an email to an Outlook email
address which contains white spaces like
"outlook email account". I get an Illegal whitespace in address exception. Is there any way
to send an email to an address with white spaces?
Thanks
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Are you sending to an email address or an Outlook name, because there is a difference. The name in Outlook is associated with an email address and that is what you need to be using. I am pretty sure a valid email address cannot have spaces, however I have no link to back that up with.
Ezra Exposito
Ranch Hand

Joined: Apr 26, 2001
Posts: 34
You are correct. The outlook name is linked to a
valid email which I am now using and it works.
Thanks for your help
 
Have you checked out Aspose?
 
subject: JavaMail: Address with white space
 
It's not a secret anymore!