End of Mail module porting