rdbaker okherba: creates a notifyEnd function and changes some login
in the sendEmail function