New record notification - added email variable, handled additional edge cases.