public string Login(string username ,string password) { DocumentWebflow docWeb = new DocumentWebflow(); docWeb.ClearCookie(); HttpRequestOperation dp = new HttpRequestOperation( "login163", "https://ssl.mail.163.com/entry/coremail/fcg/ntesdoor2?df=webmail163&from=web&funcid=loginone&iframe=1&language=-1&net=t&passtype=1&product=mail163&race=-2_-2_-2_db&style=-1&[email protected]", "savelogin=0&url2=http%3A%2F%2Fmail.163.com%2Ferrorpage%2Ferr_163.htm&username=afei_test001&password=happy_123", "POST", false, (o) => { //MessageBox.Show(o.ToString()); this.result = o.ToString(); }); dp.Execute(docWeb); //this.txtRes.Text = this.result; return this.result; }
public string SendMail(string sid,string from, string to, string title, string content) { DocumentWebflow docWeb = new DocumentWebflow(); string mailContent = HttpUtility.UrlEncode("<?xml version=\"1.0\"?><object><string name=\"id\">c:1343220470584</string><object name=\"attrs\"><string name=\"account\">\"afei_test001\"<[email protected]></string><boolean name=\"showOneRcpt\">false</boolean><array name=\"to\"><string>[email protected]</string></array><array name=\"cc\"/><array name=\"bcc\"/><string name=\"subject\">ttt</string><boolean name=\"isHtml\">true</boolean><string name=\"content\"><div style='line-height:1.7;color:#000000;font-size:14px;font-family:arial'>cccc</div></string><int name=\"priority\">3</int><boolean name=\"saveSentCopy\">true</boolean><boolean name=\"requestReadReceipt\">false</boolean><string name=\"charset\">GBK</string></object><boolean name=\"returnInfo\">false</boolean><string name=\"action\">deliver</string><int name=\"saveSentLimit\">1</int></object>"); //docWeb.ClearCookie(); HttpRequestOperation dp = new HttpRequestOperation( "SendMail163", String.Format("http://twebmail.mail.163.com/js4/s?sid={0}&func=mbox:compose&cl_send=2&l=compose&action=deliver",sid), String.Format("var={0}",mailContent), "POST", false, (o) => { MessageBox.Show(o.ToString()); this.result = o.ToString(); }); dp.Execute(docWeb); //this.txtRes.Text = this.result; return this.result; }