Changed sendmail setup, added debug logging.