             formData.appendPartWithFormData(data, name:"subject")
 
             let fileData = NSData(contentsOfURL: fileURL)
+            let string = NSString(data: fileData!, encoding: NSASCIIStringEncoding)
+            println(string)
             formData.appendPartWithFileData(fileData, name:"file", fileName: "test.html", mimeType:"text/html")
             }, error: nil)
         urlRequest.setValue("*/*", forHTTPHeaderField: "Accept")
+
         fileTransferSessionManager.setTaskDidCompleteBlock { (session, task, error) -> Void in
+
         }
 
         fileTransferSessionManager.setTaskDidSendBodyDataBlock { (session, task, bytesSent, totalBytesSent, totalBytesExcpectedToSend) -> Void in

                assert(false, "NO oauthtoken present in app. Log out!")
            }
            // has found higher level oAuthToken that is outdated, try refreshing a lower level token


        }
    }


    func send(htmlContent: String, recipients: [Recipient], uri: String, success: (() -> Void) , failure: (error: APIError) -> ()) {
        let url = NSURL(string: uri)
        let oauthToken = OAuthToken.oAuthTokenWithScope(kOauth2ScopeFull)
        let parameters = ["subject" : "kladd", "deliveryMethod" : "DIGIPOST", "authenticationLevel" : "PASSWORD"]
        validate(token: oauthToken) { () -> Void in
            let task = self.urlSessionJSONTask(httpMethod.post, url: uri, parameters: parameters, success: { (responseJSON) -> Void in
                println(responseJSON)
                let sendableDocument = SendableDocument(dictionary: responseJSON)
                sendableDocument.recipients = recipients
                println(htmlContent)
                let fileURL = sendableDocument.urlForHTMLContentOnDisk(htmlContent)
                self.uploadFile(sendableDocument.addContentUri!, fileURL: fileURL!, success: { () -> Void in
                    println(success)
