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.
# 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.