I have a servlet that sends emails when a form is submitted, and it works fine. This is done calling from client-side the sendMail()
that is implemented on sendMailServiceImpl.
My question is about security: is there a way that someone put a specific URL and those emails are sent? Something like http://myproject.appspot.com/myproject/sendmail?name=aaa&email=aa@aa.com
<servlet>
<servlet-name>sendMailServiceImpl</servlet-name>
<servlet-class>com.gw.myproject.server.SendMailServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>sendMailServiceImpl</servlet-name>
<url-pattern>/myproject/sendMail</url-pattern>
</servlet-mapping>