Mail module porting

This looks like business code, and might be better to keep within the widget. This should be the default behavior when receiving a print trigger. (Although, it is interesting to let this function available for the user to allow more tweaking.)