       sendResponse result
     
     try
-      req = http.request http_options, (res) ->
-        
+      req = http.request http_options, (res) =>        
         res.setEncoding 'utf8'
         body = ''
         res.on 'data', (chunk) ->
           body += chunk
-        req.on 'end', () ->
+        res.on 'end', () =>
           result =
             code: res.statusCode
             status: 'FAILED'

  
  _parseResultString: (msg, body, result) ->
    body = decodeURIComponent body
    
    lines = body.split("\n")
    result.msg = body
    result.statuses = []
    _.each lines, (line) ->
      line_parts = line.match /^(\+[0-9]+) (\w+) (\d+) (.+)$/
      
      _.each msg.recipients, (recipient) ->

            sendResponse null, result
          else            
            sendResponse result
      
      req.on 'error', (err) ->
        result =
          code: err.code
          errno: err.errno
          msg: err.message
        return sendResponse result
      
      req.write @_generatePostData(msg)
      req.end()
    catch err
