• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can you validate the domain of an email address?

 
Mike Payne
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using JavaMail 1.2. If the "from" address of the MimeMessage is well-formed but refers to an invalid domain (example mark@geemail.com), an exception is thrown when the message is sent. However, an exception is NOT thrown if a message is sent TO such an address. Is there any way to check to see if the domain of the "from" address is invalid before sending? Also, does anyone know why this behavior is asymmetric? (For example, is it possible to cause emails sent TO invalid domains to fail as well, rather than bouncing?)

Exception:
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: 553 5.1.8 <mark@geemail.com>... Domain of sender address mark@geemail.com does not exist
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried Authenticator?

Rgds,

Seetesh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!