• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How can you validate the domain of an email address?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried Authenticator?

Rgds,

Seetesh
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic