rewrite code for message/smtList action
fix error method arguments in $.ajax()