1 Attachment(s)
Java problem -- sending email via JSP page
Below is a copy of my feedback page
Basically, I am doing my work in a JSP page.
For now, my plan is that when I click on the ''submit'' button, everything written on the text boxes will be sent to my email (my hotmail address)
However, I do not know what are the codings needed (honestly speaking, I went up to Google to search but then, the codings are complicated and I don't know what is written) and neither do I know whether should I place all codings on one JSP page or place the codings for submission to my email on another JSP page.
Please help. Thank you.
Re: Java problem -- sending email via JSP page
The first question is your server able/willing to send email for your app?
Re: Java problem -- sending email via JSP page
Maybe check something like Sending mail from Java out :)
It's pretty straight forward but you will of course, like Norm is pointing out, need to have an SMTP server address available to use to send the email. However, it might just work to use the one they have in that example.
Code :
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.port", "465");
// Json