• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send a mail in Java with return Read Receipt

 
Seema
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you send a message such that the sender gets a return receipt when the recipient opens the email
 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is depends upon the mail server like IMAIL from www.ipswitch.com
 
Kaustubh Patil
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kalpesh Soni
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
similarly there is "Return-Receipt-To" header
but i can not get it to work !
 
Kaustubh Patil
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic