private function sendMessage($message, $successCodes = null, $errorMsg = null, $baseEncode = false) {
		$this->log($message);
		$getResponse = (bool) $successCodes;
		if ($baseEncode) $message = base64_encode($message);
		try {
			$response = $this->connection->sendMessage($message, $getResponse, self::EOL);
		} catch (SmtpConnectionException $ex) {
			$this->log($ex->getMessage(), 'server', true);
			throw $ex;
		}
		if (!$response) return null;
		
		$successCodes = is_array($successCodes) ? $successCodes : array($successCodes);
		if (!in_array($response->getCode(), $successCodes)) {
			$this->log($response, 'server', 1);
			throw new SmtpConnectionException($errorMsg);
		}
		$this->log($response);
		
		return $response;
	}
private function sendMessage($message, $successCodes = null, $errorMsg = null, $baseEncode = false) {
		$this->log($message);
		$getResponse = (bool) $successCodes;
		if ($baseEncode) $message = base64_encode($message);
		try {
			$response = $this->connection->sendMessage($message, $getResponse, self::EOL);
		} catch (SmtpConnectionException $ex) {
			$this->log($ex->getMessage(), 'server', true);
			throw $ex;
		}
		if (!$response) return null;
		
		$successCodes = is_array($successCodes) ? $successCodes : array($successCodes);
		if (!in_array($response->getCode(), $successCodes)) {
			$this->log($response, 'server', 1);
			throw new SmtpConnectionException($errorMsg);
		}
		$this->log($response);
		
		return $response;
	}
private function sendMessage ( $ message , $ successCodes = null , $ errorMsg = null , $ baseEncode = false ) { $ this -> log ( $ message ) ; $ getResponse = ( bool ) $ successCodes ; if ( $ baseEncode ) $ message = base64_encode ( $ message ) ; try { $ response = $ this -> connection -> sendMessage ( $ message , $ getResponse , self :: EOL ) ; } catch ( SmtpConnectionException $ ex ) { $ this -> log ( $ ex -> getMessage ( ) , 'server' , true ) ; throw $ ex ; } if ( ! $ response ) return null ; $ successCodes = is_array ( $ successCodes ) ? $ successCodes : array ( $ successCodes ) ; if ( ! in_array ( $ response -> getCode ( ) , $ successCodes ) ) { $ this -> log ( $ response , 'server' , 1 ) ; throw new SmtpConnectionException ( $ errorMsg ) ; } $ this -> log ( $ response ) ; return $ response ; }
sends a message over the SmtpConnection to the server
@param string $message
@param mixed $successCodes
@param string $errorMsg
@param bool $baseEncode
@throws SmtpConnectionException
@return SmtpResponse
sends a message over the SmtpConnection to the server