Mail module porting

I didn't know what to do so I let it there.