GetSpamScore

GetSpamScore method takes in a WSMessage object comprised of all the various pieces of a message including its to and from address, as well as its subject, HTML body, Text body, and list/campaign information. This is the same object used to represent a message in other areas of the API. The method returns a WSSpamScore object representing the output from the SpamAssassin spam scoring process. The WSSPamScore object contains a decimal value (PointsReceived) representing the total points received as well as a decimal value (PointsRequired) representing the point value that is considered to be spam. If the value of PointsReceived is greater than or equal to the value of PointsRequired, the WSMessage provided would be potentially considered to be spam by many email providers. The WSSpamScore object also contains a breakdown of the scores the WSMessage received, showing each rule, its description, and a decimal value showing how many points were awarded in each category. This collection can be used to see what areas of the message may be elevating the overall spam score and modify the message accordingly.

<< Back to Method List

SOAP 1.1 Request

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /v31/IntegrationService.asmx HTTP/1.1
Host: webservices.listrak.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://webservices.listrak.com/v31/GetSpamScore"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <WSUser xmlns="http://webservices.listrak.com/v31/">
      <UserName>string</UserName>
      <Password>string</Password>
    </WSUser>
  </soap:Header>
  <soap:Body>
    <GetSpamScore xmlns="http://webservices.listrak.com/v31/">
      <WSMessage>
        <ListID>int</ListID>
        <ListCampaignID>int</ListCampaignID>
        <ToName>string</ToName>
        <ReplyEmailAddress>string</ReplyEmailAddress>
        <FromName>string</FromName>
        <FromEmailAddress>string</FromEmailAddress>
        <Subject>string</Subject>
        <EnablePassalong>boolean</EnablePassalong>
        <EnableTracking>boolean</EnableTracking>
        <HTMLBody>string</HTMLBody>
        <TextBody>string</TextBody>
        <CharacterSetID>int</CharacterSetID>
        <GoogleAnalyticsCampaignName>string</GoogleAnalyticsCampaignName>
        <GoogleAnalyticsCampaignContent>string</GoogleAnalyticsCampaignContent>
      </WSMessage>
      <TestEmail>string</TestEmail>
    </GetSpamScore>
  </soap:Body>
</soap:Envelope>

SOAP 1.1 Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSpamScoreResponse xmlns="http://webservices.listrak.com/v31/">
      <WSSpamScore>
        <PointsReceived>double</PointsReceived>
        <PointsRequired>double</PointsRequired>
        <Scores>
          <Points>double</Points>
          <Rule>string</Rule>
          <Description>string</Description>
        </Scores>
        <Scores>
          <Points>double</Points>
          <Rule>string</Rule>
          <Description>string</Description>
        </Scores>
      </WSSpamScore>
    </GetSpamScoreResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2 Request

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /v31/IntegrationService.asmx HTTP/1.1
Host: webservices.listrak.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <WSUser xmlns="http://webservices.listrak.com/v31/">
      <UserName>string</UserName>
      <Password>string</Password>
    </WSUser>
  </soap12:Header>
  <soap12:Body>
    <GetSpamScore xmlns="http://webservices.listrak.com/v31/">
      <WSMessage>
        <ListID>int</ListID>
        <ListCampaignID>int</ListCampaignID>
        <ToName>string</ToName>
        <ReplyEmailAddress>string</ReplyEmailAddress>
        <FromName>string</FromName>
        <FromEmailAddress>string</FromEmailAddress>
        <Subject>string</Subject>
        <EnablePassalong>boolean</EnablePassalong>
        <EnableTracking>boolean</EnableTracking>
        <HTMLBody>string</HTMLBody>
        <TextBody>string</TextBody>
        <CharacterSetID>int</CharacterSetID>
        <GoogleAnalyticsCampaignName>string</GoogleAnalyticsCampaignName>
        <GoogleAnalyticsCampaignContent>string</GoogleAnalyticsCampaignContent>
      </WSMessage>
      <TestEmail>string</TestEmail>
    </GetSpamScore>
  </soap12:Body>
</soap12:Envelope>

SOAP 1.2 Response

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetSpamScoreResponse xmlns="http://webservices.listrak.com/v31/">
      <WSSpamScore>
        <PointsReceived>double</PointsReceived>
        <PointsRequired>double</PointsRequired>
        <Scores>
          <Points>double</Points>
          <Rule>string</Rule>
          <Description>string</Description>
        </Scores>
        <Scores>
          <Points>double</Points>
          <Rule>string</Rule>
          <Description>string</Description>
        </Scores>
      </WSSpamScore>
    </GetSpamScoreResponse>
  </soap12:Body>
</soap12:Envelope>