Feature/email scripts update

Based on richardreview on that one has to be merged first.