public static function optOut($md5email) { if (!empty($md5email)) { // Check if the email owner is one of the registered customers $customer = Customers::getCustomerbyEmailMd5($md5email); if (!empty($customer[0]['customer_id'])) { Customers::newsletter_subscription($customer[0]['customer_id'], false); } else { // Remove the email address from the email subscribers Doctrine_Query::create()->delete('NewslettersSubscribers')->where('MD5(email)', $md5email)->delete(); } return true; } else { return false; } }