/** * Example: Run an external SQL script when the module is uninstalled **/ public function uninstall() { $bounceType = array(1 => array('name' => self::HARD_BOUNCE), 2 => array('name' => self::SOFT_BOUNCE), 3 => array('name' => self::BLOCKED), 4 => array('name' => self::SPAM)); foreach ($bounceType as $type) { $bounceTypeDAO = new CRM_Mailing_DAO_BounceType(); $bounceTypeDAO->copyValues($type); if (!$bounceTypeDAO->find(true)) { $bounceTypeDAO->delete(); } } }