getRemoteUser just tells you the username of the client on the other end (assuming you prompted them for a username/password). To tell if they're received or read a message, you need to request a receipt with the mail message. It has nothing to do with http/servlets/etc.
thanks chris for your reply. There is one more ques. realted to this for instance when you send egreeting to someone you get notified when the receiver opens that greeting, so my ques. is how that happens? Is there no way to grab info who clicked my url? sa
There are lots of things you can tell about who clicked a URL: the IP address of the client machine (unless they are accessing through a proxy or firewall, etc.), the domain name of the client machine (unless they are accessing through a proxy or firewall, or get their IP address through DHCP and don't have a domain name, etc.), the type and version of the browser (unless they are accesing through a system which disables ths information, or they have set up their browser to send incorrect browser information etc.). I hope you get the picture, anything sent by a browser is potentially unreliable. Likewise with mail receipts. I hate them and always configure my email system to never return them. So do many others. So how do those greetings work? Simple, they send a complicated, unique URL to each recipient, encoding the recipient details and some redundancy to ensure it can't easily be guessed. For example, if you see something like the following in the message: < img src='http://www.supergreetings.com/message/123-78DX-957643-36/logo.gif' > You can be pretty sure that the recipient information (or at least some sort of recipient id) is contained in the gibberish numbers somewhere. All that remains is for the server code to extract that information from the URL, and it knows that the message has been viewed by the recipient.
Frank is right on - avoid the e-mail receipt business. I really find it to be more of an invasion than a convenience. One more thing to add regarding the URL encoding. When user A sends a "supergreeting" to user B, a message is sent with a URL inside. When user B clicks on the URL, a request is sent to the server, which captures the notion that user B has requested his greeting (from the data, userid, whatever, embedded in the URL), and returns the right greeting. The server can then notify user A that user B is checking out the greeting. Spiffy.