Added email sending functionality to back end of webapp