脚本宝典收集整理的这篇文章主要介绍了php – Mandrill提供无效的应用程序密钥错误,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
$args = array( 'key' => '73357ad2-e59e-4669---------','message' => array( "htML" => "<p>\r\n\tHi Adam,</p>\r\n<p>\r\n\tThanks for <a href=\"http://mandrill.COM\">registering</a>.</p>\r\n<p>etc etc</p>","text" => null,"From_email" => "xxx@xxx.com","from_name" => "SIVOnline","subject" => "Your recent registration","to" => array(array("email" => "xxx@xxx.com")),"track_oPEns" => true,"track_clicks" => true,"auto_text" => true ) ); // Open a curl session for making the call $curl = curl_init('https://mandrillapp.com/api/1.0/messages/send.json' ); // Tell curl to use HTTP POST curl_setopt($curl,CURLOPT_POST,true); curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false); // Tell curl not to return headers,but do return the response curl_setopt($curl,CURLOPT_HEADER,false); curl_setopt($curl,CURLOPT_RETURNtransfer,CURLOPT_HTTPHEADER,array('Content-type: application/json')); // Set the POST arguments to pass on curl_setopt($curl,CURLOPT_POSTFIELDS,json_encode($args)); // Make the REST call,returning the result $response = curl_exec($curl); // Close the connection curl_close( $curl );
以上是脚本宝典为你收集整理的php – Mandrill提供无效的应用程序密钥错误全部内容,希望文章能够帮你解决php – Mandrill提供无效的应用程序密钥错误所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。