Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Javax Mail API Question  RSS feed

 
Vj Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • 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
  • 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: 42970
73
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!