CreateTest

Use the following to create an Email Test. As stated previously, you can have the results returned immediately, retrieve the results at a later time or have our system send you the results when completed.

Note: In V4, the API expects the Subject and HTML (if present) fields to be Base64 encoded prior to submission.

URLs:

Sandbox:

https://sandbox.emailonacid.com/v4/createTest - Default (XML) Request
https://sandbox.emailonacid.com/v4/createTest/xml - XML Request
https://sandbox.emailonacid.com/v4/createTest/json - JSON Request

Production:

https://api.emailonacid.com/v4/createTest - Default (XML) Request
https://api.emailonacid.com/v4/createTest/xml - XML Request
https://api.emailonacid.com/v4/createTest/json - JSON Request

Request:

XML

<?xml version="1.0" encoding="utf-8"?>
<create_test>
    <content>
        <html>Base64 encoded HTML content</html>
        <url><![CDATA[http://..]]></url>
        <charset>utf-8</charset>
        <encoding>7bit</encoding>
    </content>
    <subject>Base64 encoded subject</subject>
    <free_test>false</free_test>
    <ios_fix></ios_fix>
    <test_id></test_id>
    <user_guid></user_guid>
    <spam_analysis>
        <subject></subject>
        <from_address>test@example.com</from_address>
        <spam_type>smtp</spam_type>
        <seed_key></seed_key>
        <smtp_info>
            <smtp_host>mail.example.com</smtp_host>
            <smtp_port>25</smtp_port>
            <smtp_secure></smtp_secure>
            <smtp_acct>test@example.com</smtp_acct>
            <smtp_pass>examplepass</smtp_pass>
            <smtp_from>test@example.com</smtp_from>
         </smtp_info>
    </spam_analysis>
    <clients>
        <client>
            <client_code>9</client_code>
        </client>
        <client>
            <client_code>1</client_code>
            <browsers>
                <browser_code>1_11_3</browser_code>
            </browsers>
        </client>
        ....
    </clients>
</create_test>

JSON

{
    "content" : {
         "url" : "http://gallery.campaignmonitor.com/ViewEmail/i/6DB9231C59D283A9/",
         "charset" : "UTF-8",
         "encoding" : "8bit"
    },
    "subject"   : "Base64 Encoded Subject",
    "test_id"   : "Unique Test ID",
    "user_guid" : "Unique Test ID",
    "free_test" : false,
    "ios_fix"   : "/[P|B|I]/",
    "spam_analysis" : {
        "subject" : "string",
        "from_address" : "string",
        "spam_type" : "/[seed|smtp|eoa]/",
        "seed_key" : "",
        "smtp_info" : {
            "smtp_host" : "string",
            "smtp_port" : "integer",
            "smtp_secure" : "/[|ssl|tls]/",
            "smtp_acct" : "string",
            "smtp_pass" : "string",
            "smtp_from" : "string"
        }
    },
    "clients" : [{"client_code" : 1, "browsers" : [{"browser_code" : "1_11_3"}, ...]},
                ...]
}

JSON Validation Schema:

Click here to download.

Request Details

Element Description Data Type Required Default
content     Y  
html Email HTML source, encoded in Base64. Alpha-numeric String N (Y if url element is not defined)  
url URL to HTML source. Alpha-numeric String N (Y if html element is not defined)  
charset Email character set. Alpha-numeric String Y UTF-8
encoding Content transfer encoding. Alpha-numeric String Y 7bit
subject Subject line of the email, encoded in Base64. String Y  
free_test Is this a free test, if free it will only return the free clients regardless of what is in the request client list. Boolean N false
ios_fix There must be at least 1,109 characters before the closing </head> tag or there will be a "This message is only partially downloaded" message displayed to the end user. If this is not fixed you will get a partial screenshot result for our supported iOS devices. "P" - partial screenshot; "I" - complete screenshot. String must be either "P" (Pop), "I" (Imap) or "B" (Both) N P
test_id Your unique test identifier. Alpha-numeric String Y  
user_guid Your unique identifier of the user/client requesting the test. Alpha-numeric String Y  
spam_analysis     N  
subject Subject line of the email. String Y, if spam_analysis is set  
from_address Address used to send the emails. String Y, if spam_analysis is set, and spam_type value is seed or eoa  
spam_type Type of spam test to run String, must be either "seed", "smtp" or "eoa". Y, if spam_analysis is set  
seed_key Seed List Key, seed_key value returned by the GetSeedList API response. String Y, if spam_type value is seed  
smtp_info     Y, if spam_type value is smtp  
smtp_host SMTP/MTA Server URL or IP address. String Y, if spam_type value is smtp  
smtp_port SMTP/MTA Server Port. Integer Y, if spam_type value is smtp  
smtp_secure Type of connection to use when connecting to the SMTP/MTA server. String, must be either "", "ssl" or "tls" Y, if spam_type value is smtp  
smtp_acct Username to use when connecting to SMTP/MTA Server. String Y, if spam_type value is smtp  
smtp_pass Password to use when connecting to SMTP/MTA Server. String Y, if spam_type value is smtp  
smtp_from Email address to use as the "From" when we send the spam emails to our Seed List. String Y, if spam_type value is smtp  
clients List of clients wanted in the results, if not present then all supported client results will be returned in the response. For some clients we provide both screen-shots and code-based previews. If this list and the default_result value are not set the system will default to returning a screen-shot for those clients that we offer both.   N  
client     Y, if clients element exists  
client_code Client code returned from GetClientList response. Integer Y, if clients element exists  
browsers     N  
browser_code Browser code returned from GetClientList response. String Y, if browsers element exists  

Spam Testing Notes:

We now offer three different ways to run a spam test. Each is described below.

  1. EOA: By using this option we will send the spam test emails from our email servers. The spam results will be based on content and subject of the email but use the IP reputation of our mail servers.

  2. SEED: This spam test option will allow you to send an email to our spam seed list. The spam results will be based on the IP Reputation of the sending mail server, subject and content of the email.

  3. SMTP: With this option we will send the spam test emails by connecting to the SMTP/MTA server using the supplied credentials. We will only send one email per spam test and ONLY send an email for your members. This information is not stored or logged in our system. The spam results will be based on the SMTP/MTA servers IP reputation, subject and content of the email.

Test Processing Notes:

There are several factors that affect the time it takes to process a test including but not limited to:

  1. The length of the email
  2. The number of images used
  3. The number of clients you are testing in
  4. The number of spam filters you are testing in
  5. If you are retrieving Code Analysis

Response:

XML

<?xml version="1.0" encoding="utf-8"?>
<xml>
    <results>
        <eoa_test_id>EOA TEST ID</eoa_test_id>
    </results>
</xml>

JSON

{
    "results": {
        "eoa_test_id": EOA TEST ID
    }
}

Response Details

Element Description
eoa_test_id Unique Test ID, used for retrieving test results or checking test status.