update mailcron method to Doctrine and improve syntax in previous commit