The information on this page refers to SOAP version 2. This function does not exist in SOAP version 1. |
---|
The SendEmailToCustomer function is used to send email to a customer (email will be sent to all contacts for the given customer).
This function requires a login token, which is obtained using the Login function. In addition, this function requires a subject, content, and customer_id.
Return values
On failure, the result string contains an error message. See SOAP API return codes for further information on error messages.
Example request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="https://license.x-formation.com/soap/type/vendor/version/2"> <soapenv:Header/> <soapenv:Body> <ns:SendEmailToCustomer soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <token xsi:type="xsd:string">c17117237688189a2d6b3817324b7110df92b240</token> <subject xsi:type="xsd:string">Email subject</subject> <content xsi:type="xsd:string">Email body</content> <customer_id xsi:type="xsd:int">4</customer_id> </ns:SendEmailToCustomer> </soapenv:Body> </soapenv:Envelope> |
Example response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://license.x-formation.com/soap/type/vendor/version/2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:SendEmailToCustomerResponse> <return xsi:type="ns1:Soap_Response"> <result_code xsi:type="xsd:int">0</result_code> <result_string xsi:nil="true"/> </return> </ns1:SendEmailToCustomerResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |