Beginnings of sending in a function that generates the email parameters into SendEmailTemplate. This way code is not run unnecesarily if the email is not to be sent.