Missing return statement
Initial support for mailing multiple documents
Only allow document metadata view when select same type documents
Fix comment style