Jhbate/working emails

pulling in changes to do initial deployment to devel. Still only at a testing level of completeness and expect changes as part of ongoing reviews.