I want to get the status mail after sending the mail using javamail.
I succeeded in sending the mail to multiple users, but unable to get the status of the send mail.
Please tell me what to do for getting the status mail back.
I think any solution would have to be specific to the mail server. JavaMail uses SMTP for sending mail, and that doesn't provide this kind of feedback. And even if the mail server can somehow be queried about which mails were sent, they may still be delayed or bounced later.
I have to prepare a report where I have to show status of the send mail as
Bounced mail :
is there any to achieve this functionality.....
Joined: Mar 22, 2005
That depends on your definiton of "Successful". Even though your server may have sent the mail, the target server may silently drop it as spam. Or it could be delayed for hours or days before it is finally delivered or bounced.
You need to check the mailbox associated with the address you're using to send the mails. That's where bounces would end up. Note that it will also contain messages about mail being delayed that is ultimately delivered - which would not be bounces. Plus, over time, that mailbox will attract spam. If you need to track individual mails, the easiest would be to add a unique ID to the subject (which will usually be contained in the bounce message).
I assume you mean at the time of sending, like if the address is syntactically incorrect, or no email server for the target address can be found? That would result in exceptions you can handle in the mail sending code.