• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javax Mail API Question

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We receive the below error while we are sending an email to 'dpmathew@it/matrix.com'.

javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses;
nested exception is: javax.mail.SendFailedException: 501 5.1.3 Invalid address thrown from Error sending an email

My question here, Is this exception an occurance of an invalid email address since 'dpmathew@it/matrix.com' is not in RFC822 format? or is it trying to send email to a valid address and unable to deliver?

But a note here, we validated the email but it is not checking for the '/' in the email domain, but we are sending this inside the constructer 'InternetAddress(emailAddress)' which i beleive shld check for the RFC822 format and throw an AddressException. but this didn't happen. Any thoughts? Thanks.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The forward slash is not a valid character in an email address, and the error message actually says "Invalid address".
 
Vj Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK.
Why there wasn't a AddressException when passed to the Constructor InternetAddress(emailAddress) which parses to see for RFC822 format?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"urmypal",

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.
 
reply
    Bookmark Topic Watch Topic
  • New Topic