Php 邮递邮件,已经发送了吗
使用PHP如何获得返回状态。消息是否已收到。我找到了此文档,但在使用PHP时没有太大帮助: 我不确定,但这是否有效:Php 邮递邮件,已经发送了吗,php,postageapp,Php,Postageapp,使用PHP如何获得返回状态。消息是否已收到。我找到了此文档,但在使用PHP时没有太大帮助: 我不确定,但这是否有效: if($this->postageapp->send()==true){ # returns JSON response from the server //do something, }else{ //otherwise } 谢谢无论调用是否成功,send方法都会返回一个JSON对象。我认为PHP总是评估这个返回为真 因此,您需要检查返回的对象 $re
if($this->postageapp->send()==true){ # returns JSON response from the server
//do something,
}else{
//otherwise
}
谢谢无论调用是否成功,send方法都会返回一个JSON对象。我认为PHP总是评估这个返回为真 因此,您需要检查返回的对象
$retVal = $this->postageapp->send();
$success = retVal->response->status == 'ok';
将var\u dump($this->postagapp->send())
与成功和失败的尝试结合使用。