I need my application to be able to send mails to addresses with multiple @signs For eg:- firstname.lastname@example.org@smthng How can I acheive that?
posted 12 years ago
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 ]