How do I receive an acknowledgement that a user has received my message?
To receive the acknowledgements, you'll need to set two properties in the Properties passed on when getting a Session. These are "mail.smtp.dsn.notify" and "mail.smtp.dsn.ret". The first specifies where it goes and the second what you want.
props.put("mail.smtp.dsn.notify", "SUCCESS,FAILURE ORCPT=rfc822;firstname.lastname@example.org"); props.put("mail.smtp.dsn.ret", "HDRS");
For a full description of the meaning see the RFC. If you want the full message sent back to you, use FULL instead of HDRS. email@example.com is meant to the original recipient of the email.
These acks are not about when the user reads the message, only acknowledging receipt of the message by their mail server. Its possible the mail server throws the message away as spam for instance and the end user never actually gets the message in their mailbox.
Another option, though something that can be ignored by the mail client / user is setting the "Disposition-Notification-To" header to the email you'd like to send the notification to:
message.setHeader( "Disposition-Notification-To", "firstname.lastname@example.org");