It's strongly advised to use the mailkit.sendmail_mass.results function at least 30 minutes after calling the mailkit.sendmail_mass function. In case of earlier call the results may be incomplete.
API call example:
JSON
{
"function": "mailkit.sendmail_mass.results",
"id": "client_id",
"md5": "client_md5",
"parameters": {
"ID_send": id_send,
"request_id": request_id
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mailkit.sendmail_mass.results</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<i4>id_send</i4>
</value>
</param>
<param>
<value>
<i4>request_id</i4>
</value>
</param>
</params>
</methodCall>
Values
client_id * = client ID can be found in your Mailkit account's menu Profile/Integration.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile/Integration.
id_send = ID message
request_id * = request ID
* required value
Successful call response with no errors:
JSON
{
"error_status": 0,
"status": "OK"
}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>status</name>
<value>
<string>OK</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Values
status = OK = the request / specific id_send request was processed without any errors (as of now). This status is returned even during the request is being processed.
Successful call response with errors:
JSON
{
"results": [
{
"DATE": "2024-08-22 16:12:33",
"INFO": "invalid email status permanent",
"ID_EMAIL": 47086782,
"ERROR_CODE": 2,
"ID_SEND": 1214123,
"EMAIL": "mail1@mail.cz",
"ID_SEND_MESSAGE": 1392658739
},
{
"ID_EMAIL": 47036781,
"INFO": "unsubscribed email",
"DATE": "2024-08-22 16:12:33",
"ID_SEND_MESSAGE": 1392658739,
"EMAIL": "mail2@mail.cz",
"ERROR_CODE": 6,
"ID_SEND": 1214123
},
{
"ID_SEND_MESSAGE": 1392658739,
"ID_SEND": 1214123,
"ID_EMAIL": 47038678,
"DATE": "2024-08-22 16:12:33",
"EMAIL": "mail3@mail.cz",
"ERROR_CODE": 4,
"INFO": "missing mailinglist_id"
}
],
"error_status": 1,
"status": "ERROR"
}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>status</name>
<value>
<string>ERROR</string>
</value>
</member>
<member>
<name>results</name>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>ERROR_CODE</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>INFO</name>
<value>
<string>url return null</string>
</value>
</member>
<member>
<name>DATE</name>
<value>
<string>2015-05-13 09:43:50</string>
</value>
</member>
<member>
<name>ID_EMAIL</name>
<value>
<i4>123456789</i4>
</value>
</member>
<member>
<name>EMAIL</name>
<value>
<string>mail@mail.cz</string>
</value>
</member>
<member>
<name>ID_SEND</name>
<value>
<i4>12345</i4>
</value>
</member>
<member>
<name>ID_SEND_MESSAGE</name>
<value>
<i4>123456789</i4>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Values
status = ERROR = the request / specific id_send request was processed with following errors that prevented delivery to the recipients listed.
results:
ERROR_CODE
- 1 = unable to attach file attachment
- 2 = recipient email invalid
- 3 = recipient email missing
- 4 = invalid mailinglist_id
- 5 = invalid id_message (campaign_id)
- 6 = recipient email is unsubscribed
- 7 = campaign is missing sender address
- 8 = invalid template file
INFO = error description
DATE = date and time of request processing
EMAIL = recipient email address
ID_EMAIL # = recipient email ID
ID_SEND # = campaign delivery ID
ID_SEND_MESSAGE # = message ID (unique for each recipient)
# may return a value of 0 in case an email, delivery / message couldn't be created