From codex, 1 Year ago, written in JavaScript.
Embed
  1. import console;
  2. import web.rest.client;
  3. import string.html;
  4.  
  5. var http = web.rest.client();
  6. http.api("https://oa.tongda2000.com/logincheck.php").post(
  7.      UNAME="lijia";
  8.      encode_type=1;
  9. );
  10.  
  11. http.sendMultipartForm( {
  12.         TO_ID = "912";
  13.         TO_NAME = "王征";
  14.         SUBJECT = "测试邮件标题!";
  15.         SEND_FLAG = 1;
  16.         SMS_REMIND = "on";
  17.         FROM_WEBMAIL = "abc@263.net";
  18.         TD_HTML_EDITOR_CONTENT= /*测试邮件内容*/
  19.     }
  20.     ,function(str,sendSize,contentLength){
  21.         console.log("正在向服务器提交数据",math.size64(sendSize).format() );
  22.     }
  23. );
  24.  
  25. var html = http.api("https://oa.tongda2000.com/general/email/new/submit.php").post()
  26. console.log( string.html.toText(html) );
  27. console.pause(true);