work/extend/sms/submail/lib/messagesend.php
2019-01-17 11:05:47 +08:00

39 lines
910 B
PHP

<?PHP
class MESSAGEsend{
protected $configs;
protected $To=array();
protected $Content='';
function __construct($configs){
$this->configs=$configs;
}
public function SetTo($address){
$this->To=trim($address);
}
public function SetContent($content){
$this->Content=$content;
}
public function AddVar($key,$val){
$this->Vars[$key]=$val;
}
public function buildRequest(){
$request=array();
$request['to']=$this->To;
$request['content']=$this->Content;
return $request;
}
public function send(){
$message=new message($this->configs);
return $message->send($this->buildRequest());
}
}