Changed emails sending function to continue when an email can not be send.