Mail module porting

Save the id inside the class mail and use this id when you render the widget, and don't call this function here, but let it available to tweak the way the widget work.