• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transport and Connection event listener

Ajay Saxena
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple Java Mail based SMTP client to send emails.This client actually instantiates a singleton Mailer object that sends the mails when its sendMail() method is invoked.

I have made this Mailer implement Transport and Connection listener interfaces,and I expect the messageNotDelivered() method to get invoked in the Transport dispatcher daemon thread,whenever the SMTP server fails to deliver the message to the recipient.

In other words, I expect the method messageNotDelivered() to be invoked even if Transport.sendMessage() is successful,but delivery of the message to the recipient by the SMTP server is NOT.

However,what I'm observing is that irrespective of whether the message got delivered to the end recipient or not,messageDelivered() gets called.

Any pointers???

Also the Connection event listener methods are never called.

Currently,I don't have the bandwidth to debug the JavaMail implementation code to do the dirty investigation..
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic