我正在开发通过 Infusionsoft API 和 XMLRPC 从我们的网站发送电子邮件的代码。
这是我的代码:
$email = $user_rec['email'];
$contactID=$user_rec['client_infusionid'];
echo $contactID;
$Subject = 'Your reset password request at GIC Deal Finders';
$From = $this->GetFromAddress();
$link = 'http://dashboard.gicdealfinders.info/resetpwd.php?email='.
urlencode($email).'&code='.
urlencode($this->GetResetPasswordCode($email));
$htmlBody ='Hello '.$user_rec["name"].'<br/><br/>'.
'There was a request to reset your password at GIC Deal Finders<br/>'.
'Please click the link below to complete the request: <br/><a href="'.$link.'">'.$link.'</a><br/><br/>'.
'<br/>'.
'Regards,<br/>'.
'Toyin Dawodu, MBA<br/>'.
'Founder and Chief Relationship Officer';
$clients = new xmlrpc_client("https://ze214.infusionsoft.com/api/xmlrpc");
$clients->return_type = "phpvals";
$clients->setSSLVerifyPeer(FALSE);
###Build a Key-Value Array to store a contact###
$emailI = array(
'contactList' => $contactID,
'fromAddress' => $From,
'toAddress' => $email,
'ccAddresses' => 'admin@gicdealfinders.info',
'bccAddresses' =>'abhilashrajr.s@gmail.com',
'contentType' => 'HTML',
'subject' => $Subject,
'htmlBody' => $htmlBody,
'textBody' => 'test');
//$check=$myApp->sendEmail($clist,"Test@test.com","~Contact.Email~", "","","Text","Test Subject","","This is the body");
###Set up the call###
$calls = new xmlrpcmsg("APIEmailService.sendEmail", array(
php_xmlrpc_encode($this->infusion_api), #The encrypted API key
php_xmlrpc_encode($emailI) #The contact array
));
###Send the call###
$results = $clients->send($calls);
//$conID = $results->value();
/*###Check the returned value to see if it was successful and set it to a variable/display the results###*/
if(!$results->faultCode()) {
return true;
} else {
print $results->faultCode() . "<BR>";
print $results->faultString() . "<BR>";
return false;
}
捕获的错误显示:
-1
No method matching arguments: java.lang.String, java.util.HashMap
任何人都可以检查我的代码并向我展示修复它的方法吗?