call the gen_email function
Merge pull request #126 from bjryan2/master

call the gen_email function