• Post Reply Bookmark Topic Watch Topic
  • New Topic

Javamail - when I send an e-mail to a non existant mailbox doesn't throw any except  RSS feed

 
Rogerio Kioshi
Ranch Hand
Posts: 690
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a class with sends e-mails. But when I try to send a message to an address which doesn't exist, it doesn't throw any exception.

What could it be the reason?

 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should it? The transport mechanism works fine. The message gets off your system and into the email world.
What happens when you send an email to a bogus address using a "real" email client is you get a response from the destination that the email is undeliverable. Did you set your reply-to address to a real address? I'd expect a reply to that address that the email is undeliverable.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing the in the SMTP spec. to require a delivery failure message be returned. You can set the reply-to address and you should get some sort of delivery failure message, but then again you might not.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can expect an exception if the message transmission fails.In your case the message is reaching the SMTP server properly , so no exception.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!