When you visit most websites, they have a column called "contact us" where they let you send a message. Their form looks something like this:
<form action="contact" method="post">
<p>Your email address: <input name="email"></p>
<p>Mail subject: <input name="subject"></p>
<p>Mail message: <textarea name="message"></textarea></p>
<p><input type="submit"><span class="message">${message}</span></p>
</form>
What I want is this: when user hit submit, I want this message to be directly sent to my gmail (not though Microsoft Outlook). It has something to do with JavaMail API. I am trying to follow how to send an email from jsp/servlet? and http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/javamail/javamail.html. But confused about their send or sendMail methods respectively.
Problem: sender's email setting changes every time.
I appreciate if someone could help me out.