Sending email without authentication

I have a form where the user fills in the to and from email addresses. Then clicks on the send button. Now I want to send the email automatically without password authentication. JavaMail API I used, but it is giving me AuthenticationFailed Exception. How to solve this problem without authentication.

THe form details are passed to a javabean through a servlet. The javabean then uses the JavaMail API to send the mail. This is what I have done.

[459 byte] By [harish_nkumara] at [2007-11-27 8:19:31]
# 1
It depends entirely on the mail server you're using whether it acceptsmessages without authentication.
bshannona at 2007-7-12 20:07:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
The scenario is like the user wants to email a link that he comes across. He wants to email it to his friend.For that he should be able to just specify the toAddress and say send without specifying the password. Is their a way of achieving this across all email servers?
harish_nkumara at 2007-7-12 20:07:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

No.

The way most web sites that offer this feature work is that they use their own

mail server to send the message. They don't use the user's mail server.

They usually have some knowledge of the user's email address and they

configure their mail server to allow them to "fake" the From address on the

email so that it appears to come from the user (which it really does, since it's

triggered by their request) even though it doesn't go through the user's mail

server. Some receiving mail servers will reject such messages since the

From address doesn't match the domain that sent the message.

How to configure a mail server to work properly in such an environment is a

topic for another forum.

bshannona at 2007-7-12 20:07:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Can you please give me info about how to go about setting up our mail server to achieve what I have said above. This is very urgent. Or atleast point me to the proper thread.
harish_nkumara at 2007-7-12 20:07:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
This is a question for your mail server vendor. How to do this is differentfor every mail server.
bshannona at 2007-7-12 20:07:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...