You need to sign in to do that
Don't have an account?

Looking for "sendEmail" example
Hello,
I'm currently trying to get the new API command "sendEmail" to work with PHP/nusoap - so far it is just throwing various error messages ;-)
Can someone please provide an example - PHP would be great, but an XML/SOAP snippet of the actual API call would to it as well. Thanks in advance!
Cheers,
Harry
Must specify a {http://www.w3.org/2001/XMLSchema-instance}type attribute value for the {urn:enterprise.soap.sforce.com}messages element
Here is the function so far:
public function sendEmail() {
$this->_setSessionHeader();
$params = array();
$params['messages']['bccAddresses'] = new SoapVar('', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
$params['messages']['ccAddresses'] = new SoapVar('', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
$params['messages']['charset'] = new SoapVar('utf-8', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
$params['messages']['htmlBody'] = new SoapVar('howdy', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
$params['messages']['plainTextBody'] = new SoapVar('testing 123', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
$params['messages']['targetObjectId'] = new SoapVar('', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
$params['messages']['toAddresses'] = new SoapVar('info@bradino.com', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
$this->sforce->__soapCall("sendEmail", array('sendEmail' => $params));
}