function sendText ( $to, $from, $message, $unicode=null ) {
	
		// Making sure strings are UTF-8 encoded
		if ( !is_numeric($from) && !mb_check_encoding($from, 'UTF-8') ) {
			trigger_error('$from needs to be a valid UTF-8 encoded string');
			return false;
		}

		if ( !mb_check_encoding($message, 'UTF-8') ) {
			trigger_error('$message needs to be a valid UTF-8 encoded string');
			return false;
		}
		
		if ($unicode === null) {
			$containsUnicode = max(array_map('ord', str_split($message))) > 127;
		} else {
			$containsUnicode = (bool)$unicode;
		}
		
		// Make sure $from is valid
		$from = $this->validateOriginator($from);

		// URL Encode
		$from = urlencode( $from );
		$message = urlencode( $message );
		
		// Send away!
		$post = array(
			'from' => $from,
			'to' => $to,
			'text' => $message,
			'type' => $containsUnicode ? 'unicode' : 'text'
		);
		return $this->sendRequest ( $post );
		
	}
function sendText ( $to, $from, $message, $unicode=null ) {
	
		// Making sure strings are UTF-8 encoded
		if ( !is_numeric($from) && !mb_check_encoding($from, 'UTF-8') ) {
			trigger_error('$from needs to be a valid UTF-8 encoded string');
			return false;
		}

		if ( !mb_check_encoding($message, 'UTF-8') ) {
			trigger_error('$message needs to be a valid UTF-8 encoded string');
			return false;
		}
		
		if ($unicode === null) {
			$containsUnicode = max(array_map('ord', str_split($message))) > 127;
		} else {
			$containsUnicode = (bool)$unicode;
		}
		
		// Make sure $from is valid
		$from = $this->validateOriginator($from);

		// URL Encode
		$from = urlencode( $from );
		$message = urlencode( $message );
		
		// Send away!
		$post = array(
			'from' => $from,
			'to' => $to,
			'text' => $message,
			'type' => $containsUnicode ? 'unicode' : 'text'
		);
		return $this->sendRequest ( $post );
		
	}
function sendText ( $ to , $ from , $ message , $ unicode = null ) { // Making sure strings are UTF-8 encoded
 if ( ! is_numeric ( $ from ) && ! mb_check_encoding ( $ from , 'UTF-8' ) ) { trigger_error ( '$from needs to be a valid UTF-8 encoded string' ) ; return false ; } if ( ! mb_check_encoding ( $ message , 'UTF-8' ) ) { trigger_error ( '$message needs to be a valid UTF-8 encoded string' ) ; return false ; } if ( $ unicode === null ) { $ containsUnicode = max ( array_map ( 'ord' , str_split ( $ message ) ) ) > 127 ; } else { $ containsUnicode = ( bool ) $ unicode ; } // Make sure $from is valid
 $ from = $ this -> validateOriginator ( $ from ) ; // URL Encode
 $ from = urlencode ( $ from ) ; $ message = urlencode ( $ message ) ; // Send away!
 $ post = array ( 'from' => $ from , 'to' => $ to , 'text' => $ message , 'type' => $ containsUnicode ? 'unicode' : 'text' ) ; return $ this -> sendRequest ( $ post ) ; }
Prepare new text message.

If $unicode is not provided we will try to detect the
message type. Otherwise set to TRUE if you require
unicode characters.
Prepare new text message .