                 (.writeTo message os)
                 (.toByteArray os))
         b64 (str->b64 bytes)]
-    (api-request :post-json "/users/me/drafts" {:message {:raw (URLEncoder/encode b64 "UTF-8")}} :auth (get-token) :resp :raw)))
+    (api-request :post-json "/users/me/drafts" {:message {:raw (URLEncoder/encode b64 "UTF-8")}} :auth (get-token))))
 
 (defn draft-delete
   "Delete a draft by message-id."

  (api-request :get (str "/users/me/messages/" message-id) {:format (name format)} :auth (get-token)))

(defn message-send
  "Sends an email to a specified user."
  [message & {:keys [thread-id]}]
  (let [message (if (map? message) (map->mime message) message)
        bytes (with-open [os (java.io.ByteArrayOutputStream.)]
                (.writeTo message os)
                (.toByteArray os))
        b64 (str->b64 bytes)]
    (api-request :post-json "/users/me/messages/send" {:raw (URLEncoder/encode b64 "UTF-8")} :auth (get-token) :resp :raw)))

; Users.threads


  [msg]
  (let [session (Session/getDefaultInstance (java.util.Properties.))]
    (doto (MimeMessage. session)
          (.setFrom (address "me@gmail.com"))
          (.addRecipient Message$RecipientType/TO (address (:to msg)))
          ;(.addRecipient Message$RecipientType/CC (address (:cc msg)))
          ;(.addRecipient Message$RecipientType/BCC (address (:bcc msg)))
