moved showAlerts call into the success case for sending a message