Email reporting working on maps3. About to change/simplify to stored function.