• Post Reply Bookmark Topic Watch Topic
  • New Topic

Email delivery status notification  RSS feed

 
albert sie
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to know can I ask for notification when an email has been sent or failed to send(with error statement) by using javamail? I have went through a lot of internet tutorial and etc, but I still do not know how to start coding this part. pls help...

regards,
albert
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Albert

U can get the notification by implementing the TransportListener, TransportEvent.

Then implement the messageDelivered(TransportEvent e) function and the public void messageNotDelivered(TransportEvent e) in TransportEvent.

I have posted my code below. check out.
 
albert sie
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it we just need to copy this coding into my bean file and when sending the mail, we need to call the function together with sending function???
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!