wood burning stoves*
The moose likes Other JSE/JEE APIs and the fly likes How to send a mail in Java with return Read Receipt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to send a mail in Java with return Read Receipt " Watch "How to send a mail in Java with return Read Receipt " New topic
Author

How to send a mail in Java with return Read Receipt

Seema
Greenhorn

Joined: Aug 05, 2002
Posts: 15
How do you send a message such that the sender gets a return receipt when the recipient opens the email
Graham Thorpe
Ranch Hand

Joined: Mar 25, 2002
Posts: 265
That is depends upon the mail server like IMAIL from www.ipswitch.com
Kaustubh Patil
Ranch Hand

Joined: Aug 13, 2001
Posts: 164
Seema,
Is it that you want the notification that your mail has reached the target address or the notification that it has been opened for reading ?
The first case can be solved. This is like requesting the read receipts. For this thing you need to set a header as a part of your SMTP request.
The name of the header should be "Disposition-Notification-To" and the value should be "<your email address>"
You can set this by adding addHeader(name,value) method of your messege.
Tell if this helps.
-Kaustubh.


Kaustubh. Mumbai, India.
Kalpesh Soni
Ranch Hand

Joined: Jan 02, 2001
Posts: 312
similarly there is "Return-Receipt-To" header
but i can not get it to work !


Test 094, IBM WID 6.0 cert
SCJP 1.2
SCBCD 1.3 Beta
SCWCD 1.4 Beta
SCMAD Beta
SCDJWS Beta

KS
Kaustubh Patil
Ranch Hand

Joined: Aug 13, 2001
Posts: 164
The "Return-Receipt-To" header is not a mandatory header for the smtp servers to support.
Some older unix sendmail servers used to support it but many discontinued it as it had severe problems. You could find lot of information over this on the net.
The "Disposition-Notification-To" is supported by many recent smtp servers and is a better choice over "Return-Receipt-To".
-Kaustubh.
Raymond Ou
Ranch Hand

Joined: Jun 03, 2003
Posts: 34
The "Return-Receipt-To" header works in outlook system of my company, but it is a "delivery receipt" other than a "read receipt" which I actually want, can somebody tell me how to implement it?
The header content of the mail with read receipt sent in outlook use "Return-Receipt-To":
Return-Receipt-To: abc@xyz.com
however when I set the same header with java mail API, the outlook send a "delivery receipt" instead (
Raymond
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send a mail in Java with return Read Receipt
 
Similar Threads
Set read receipt in outlook
writing content for read receipt in java mail program
how to check if assignment is properly uploaded
Mail content is displaying as attachment
JavaMail - Delivery failure