Excellent. This works! An email is returned to the address specified when the 
recipient reads the mail.
Now, would you happen to know the "Delivery Request" field to add to the header?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 9:51 PM
To: JDJList
Subject: [jdjlist] Re: JavaMail



Greetings,

I am not sure whether JavaMail API provides a specific method for doing that or 
not.
But, I think you can archive what you want by doing the following things.

Basically many of those similar functions provided by the internet protocol are 
used some optional header fields. 
For instance, if you are familiar with HTTP protocol, you should know 
"Set-cookie: " headers are used for delivery of additional information.

In a mail message, we can add the following header field to indicate the a 
"return receipt" is required for the message.

Disposition-Notification-To: yourname <[EMAIL PROTECTED]>

The read receipt mail would be sent to the address you set.

In JavaMail, you can invoke addHeader(String, String) of the 
javax.mail.internet.MimeMessage instance to add the above header to your 
message.

e.g. 
...
 // create a message
 Message msg = new MimeMessage(session);
// add header
  msg.addHeader("Disposition-Notification-To", "yourname <[EMAIL PROTECTED]>
");
...

(I didn't test the code above, hope it works)

Happy Programming
-Victor Cheung





>From : Luc Foisy <[EMAIL PROTECTED]> on 21/05/2002 12:27:14 PM 
To: [EMAIL PROTECTED]
cc:  (bcc: Victor HT CHEUNG/HD/HKSARG)
Subject: [jdjlist] JavaMail



Could anyone tell me if JavaMail has some kind of support for mail tracking?
As in, tagging the mail to send a reply when the message is sent, and when
the message is read?
I think its called "read reciept" or something. I can't find anything in the
API or in a few tutorials about it.

Can you do this, and how do you do it? ( any tutorial pointers would be good
)

Luc Foisy


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm




To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to