Error notification if send test mail returns 500

closes #3728
- If the mail config is broken, the ajax call will fail with 500 and
not return an error.
- This change catches 500 and wraps the error in a notification.
The 500 response should already be handled by the `catch` block. The issue is that `showErrors` won't unwrap an API response to get the error. 

I think the only thing needed is just to change `showErrors` to `showAPIError`.