Check return code when sending messages and react on it

Notify user if a message could not be sent.