Assuming that this HTML file is part of a web application, you'd need to use the following APIs/technologies:
Servlet API for reading the form submissionJDBC for retrieving the email addresses from the databaseJavaMail for sending out emailsan account on a mail server Are you familiar with any or all of these? Which specifically do you have questions about?