AS7-6334 - mail & ws transformers, includes #3984

This PR includes @kabir 's work from #3984 which can be closed.