generated email model and controller