正在用搜狐的Sendcloud發郵件,用x_smtpapi定義收件者。文檔嚴重不足……和客服試了幾次都不行。代碼:
$recipient = "'123456@qq.com', '789011@qq.com'"; $title = $this->input->post('title'); $body = $this->input->post('body'); $x_smtpapi = json_encode(array( "to" => $recipient)); $data= array( 'api_user'=>'postmaster@conglinwang.sendcloud.org', 'api_key' =>'XXXX', 'from'=>'xxxx', 'fromname'=>'xxxxx', 'subject'=>$title, 'html'=>$body, 'x_smtpapi'=>$x_smtpapi );
報錯為:{"message":"error","errors":["Parameter x-smtpapi is not a valid json stringjava.lang.String cannot be cast to net.sf.json.JSONArray"]}
大牛們看看。謝了!
回複內容:
正在用搜狐的Sendcloud發郵件,用x_smtpapi定義收件者。文檔嚴重不足……和客服試了幾次都不行。代碼:
$recipient = "'123456@qq.com', '789011@qq.com'"; $title = $this->input->post('title'); $body = $this->input->post('body'); $x_smtpapi = json_encode(array( "to" => $recipient)); $data= array( 'api_user'=>'postmaster@conglinwang.sendcloud.org', 'api_key' =>'XXXX', 'from'=>'xxxx', 'fromname'=>'xxxxx', 'subject'=>$title, 'html'=>$body, 'x_smtpapi'=>$x_smtpapi );
報錯為:{"message":"error","errors":["Parameter x-smtpapi is not a valid json stringjava.lang.String cannot be cast to net.sf.json.JSONArray"]}
大牛們看看。謝了!