Hi Cord.

Any chance of helping me out on this: I'm using MailBeez 2.5 and have slightly adapted the Simple Review module and made it a Satisfaction Survey module. However, the problem I'm having is that it sends emails without date restrictions - today it sent out emails to customers who purchased several years ago... My settings are as follows:
Set days passed: 10
Set days to skip after: 20

This is the query used for audience:
Code:
function getAudience() {
			global $languages_id, $language;
			
			$status = MAILBEEZ_SATISFACTION_ORDER_STATUS_ID;
			
      $date_skip = $this->dbdate(MAILBEEZ_SATISFACTION_PASSED_DAYS_SKIP);
      $date_passed = $this->dbdate(MAILBEEZ_SATISFACTION_PASSED_DAYS);
														
      $query_raw = "select c.customers_firstname, c.customers_lastname, o.orders_id, o.customers_id, c.customers_email_address, o.date_purchased, s.date_added as status_date
											      from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c,  " . TABLE_ORDERS_STATUS_HISTORY . " s
											      where o.customers_id = c.customers_id
															and o.orders_id = s.orders_id
															and o.orders_status = s.orders_status_id 
											        and s.orders_status_id = '" . (int)$status . "' 
											        and s.date_added <= '" . $date_passed . "' 
											        and s.date_added > '" . $date_skip . "' 
											      order by o.orders_id ASC";
			
			//echo $query_raw ;
			
			$query = mh_db_query($query_raw);
			$customer_array = array();
			$customer_products_array = array();
			$customer_orders_array = array();
I haven't changed any MailBeez core files. Of course, database entries are valid (checked the database: MAILBEEZ_SATISFACTION_PASSED_DAYS_SKIP=20, MAILBEEZ_SATISFACTION_PASSED_DAYS=10)

If you want, I can send you the entire module for you to check.

Thanks.