You can use any kind of scripting language for this.
If you are using server side scripting, Once both the selects are filled, you can submit the form by using onchange=""..
When the form is submitted,
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions.
Consider email address RFCs:
Look at HTML5 form input element (with type=email) regex pattern: