• Post Reply Bookmark Topic Watch Topic
  • New Topic

multiple at signs in email address

 
Mrudula Madiraju
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need my application to be able to send mails to addresses with multiple @signs
For eg:- abc@xyz.com@smthng
How can I acheive that?
 
eammon bannon
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presuming your mail server supports such addresses (and I'm assuming it does, otherwise you wouldn't have asked the question ), just create a new javax.mail.internet.InternetAddress object for the address and send the mail as you always would. InternetAddress will validate the address, but it won't validate against strict RFC822 defined syntax (specifically it doesn't check for the existance of an '@' symbol at all, so should not complain if there are two). You should be fine to just use JavaMail as you normally would.
[ April 13, 2004: Message edited by: eammon bannon ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!