# File lib/queue.rb, line 92
    def qmqp(return_path=nil, recipients=nil, message=nil, *options)
      parameters(return_path, recipients, message, options)
      
      begin
        ip = @options[:ip] || File.readlines(QMQP_SERVERS).first.chomp
        #puts "CONNECT #{:ip}, #{@options[:qmqp_port]}"
        socket = TCPSocket.new(ip, @options[:qmqp_port])
        raise "QMQP can not connect to #{ip}:#{@options[:qmqp_port]}" unless socket
        
        # Build netstring of messagebody+returnpath+recipient...
        nstr = (@message.map.join("\n")+"\n").to_netstring # { |m| m }.join("\t").to_netstring
        nstr += @return_path.to_netstring
        nstr += @recipients.map { |r| r.to_netstring }.join
        socket.send( nstr.to_netstring, 0 )

        @response = socket.recv(1000) # "23:Kok 1182362995 qp 21894," (its a netstring)
        @success = case @response.match(/^\d+:([KZD])(.+),$/)[1]
          when 'K' then true  # success
          when 'Z' then nil   # deferral
          when 'D' then false # failure
          else false
        end
        logmsg = "RubyQmail QMQP [#{ip}:#{@options[:qmqp_port]}]: #{@response} return:#{@success}"
        @options[:logger].info(logmsg)
        puts logmsg
        @success
      rescue Exception => e
        @options[:logger].error( "QMQP can not connect to #{@opt[:qmqp_ip]}:#{@options[:qmqp_port]} #{e}" )
        raise e
      ensure
        socket.close if socket
      end
    end