public function validEmail($data) {
		$data = array_shift($data);
		if (empty($data)) {
			return false;
		}

		if (is_array($data)) {
			return false;
		}

		$result = true;
		$emails = explode(CAKE_SETTINGS_APP_SMTP_EMAIL_DELIM, (string)$data);
		foreach ($emails as $email) {
			$email = trim($email);
			if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
				$result = false;
			}
		}

		return $result;
	}
public function validEmail($data) {
		$data = array_shift($data);
		if (empty($data)) {
			return false;
		}

		if (is_array($data)) {
			return false;
		}

		$result = true;
		$emails = explode(CAKE_SETTINGS_APP_SMTP_EMAIL_DELIM, (string)$data);
		foreach ($emails as $email) {
			$email = trim($email);
			if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
				$result = false;
			}
		}

		return $result;
	}
public function validEmail ( $ data ) { $ data = array_shift ( $ data ) ; if ( empty ( $ data ) ) { return false ; } if ( is_array ( $ data ) ) { return false ; } $ result = true ; $ emails = explode ( CAKE_SETTINGS_APP_SMTP_EMAIL_DELIM , ( string ) $ data ) ; foreach ( $ emails as $ email ) { $ email = trim ( $ email ) ; if ( ! filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ) { $ result = false ; } } return $ result ; }
Validation email addresses

@param string $data A list of email addresses separated by a comma.
@return bool Success
Validation email addresses