Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

How to send a mail in Java with return Read Receipt

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is depends upon the mail server like IMAIL from www.ipswitch.com
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
get schwifty. tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic