public function deleteEmailAccount($user, $params) {
		if (is_null($user) || ! is_string($user) || (! strpos($user, '@') === false)) {
			throw new InvalidArgumentException('user must be string representing userId');
		}
		if (is_string($params)) {
			$params = array('label' => $params);
		}
		else {
			$params = $this->_filterParams($params, array('label'), array('label'));
			if ($params === false) {
				throw new InvalidArgumentException("params array contains invalid parameters or misses required parameters");
			}
		}
		return $this->delete($user, 'email_accounts/' . $params['label']);
	}
public function deleteEmailAccount($user, $params) {
		if (is_null($user) || ! is_string($user) || (! strpos($user, '@') === false)) {
			throw new InvalidArgumentException('user must be string representing userId');
		}
		if (is_string($params)) {
			$params = array('label' => $params);
		}
		else {
			$params = $this->_filterParams($params, array('label'), array('label'));
			if ($params === false) {
				throw new InvalidArgumentException("params array contains invalid parameters or misses required parameters");
			}
		}
		return $this->delete($user, 'email_accounts/' . $params['label']);
	}
public function deleteEmailAccount ( $ user , $ params ) { if ( is_null ( $ user ) || ! is_string ( $ user ) || ( ! strpos ( $ user , '@' ) === false ) ) { throw new InvalidArgumentException ( 'user must be string representing userId' ) ; } if ( is_string ( $ params ) ) { $ params = array ( 'label' => $ params ) ; } else { $ params = $ this -> _filterParams ( $ params , array ( 'label' ) , array ( 'label' ) ) ; if ( $ params === false ) { throw new InvalidArgumentException ( "params array contains invalid parameters or misses required parameters" ) ; } } return $ this -> delete ( $ user , 'email_accounts/' . $ params [ 'label' ] ) ; }
Remove the connection to an IMAP account

@param string        $user
@param string|array  $params     either a string or assoc array with "label" as its key

@throws InvalidArgumentException

@return ContextIOResponse|false
Remove the connection to an IMAP account