• Features
  • Services
    • Email Authentication
    • Agency Partnerships
    • Email Training
    • Inbox Brand Visibility
    • Deliverability
  • Resources
    • Knowledge Base
    • API documentation
    • Blog
    • Status
    • BIMI inspector
  • About us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    • Privacy recommendations
  • Features
  • Services
    • Email Authentication
    • Agency Partnerships
    • Email Training
    • Inbox Brand Visibility
    • Deliverability
  • Resources
    • Knowledge Base
    • API documentation
    • Blog
    • Status
    • BIMI inspector
  • About us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    • Privacy recommendations
  • Login
    EN CS
Mailkit logo
  • Features
  • Services
    • Email Authentication
    • Agency Partnerships
    • Email Training
    • Inbox Brand Visibility
    • Deliverability
  • Resources
    • Knowledge Base
    • API documentation
    • Blog
    • Status
    • BIMI inspector
  • About us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    • Privacy recommendations
  • Features
  • Services
    • Email Authentication
    • Agency Partnerships
    • Email Training
    • Inbox Brand Visibility
    • Deliverability
  • Resources
    • Knowledge Base
    • API documentation
    • Blog
    • Status
    • BIMI inspector
  • About us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    • Privacy recommendations
  • Login
    EN CS
EN CS
Login
  • Mailkit
  • Resources
  • API documentation
  • Campaign delivery
  • mailkit.sendmail_mass
    API Introduction
  • Campaign management (11)
    mailkit.campaigns.list mailkit.campaigns.create mailkit.campaigns.update mailkit.campaigns.single.schedule mailkit.campaigns.schedule.list mailkit.campaigns.schedule.timezone mailkit.campaigns.schedule.cancel mailkit.campaigns.messages mailkit.campaigns.messages.last mailkit.campaigns.messages.test mailkit.campaigns.history
  • Mailing list management (18)
    mailkit.mailinglist.list mailkit.mailinglist.create mailkit.mailinglist.delete mailkit.mailinglist.adduser mailkit.mailinglist.edituser mailkit.mailinglist.import mailkit.mailinglist.getstatus mailkit.mailinglist.unsubscribed mailkit.mailinglist.engagement mailkit.email.getstatus mailkit.email.getstatus.history mailkit.email.move mailkit.email.delete mailkit.email.unsubscribe mailkit.email.unsubscribe.getstatus mailkit.email.revalidate mailkit.email.topics mailkit.email.wipe
  • Campaign delivery (4)
    mailkit.sendmail mailkit.sendmail_mass mailkit.sendmail_mass.results mailkit.sendsms
  • Reporting (11)
    mailkit.report mailkit.report.campaign mailkit.report.message mailkit.report.message.recipients mailkit.report.message.feedback mailkit.report.message.links mailkit.report.message.links.visitors mailkit.report.message.bounces mailkit.report.raw.messages mailkit.report.raw.bounces mailkit.report.raw.responses
  • Profile (2)
    mailkit.profile.emails.list mailkit.profile.queries.list
  • Other (4)
    Event API mailkit.filemanager.upload mailkit.filemanager.list mailkit.filemanager.delete
  • Examples (3)
    PHP example 1 (Example of mailkit.mailinglist.list call) PHP example 2 (example of mailkit.campaigns.single.schedule call) PERL example of mailkit.mailinglist.adduser call
  • API Introduction
  • Campaign management
  • Mailing list management
  • Campaign delivery
  • Reporting
  • Profile
  • Other
  • Examples
API Introduction
mailkit.campaigns.list mailkit.campaigns.create mailkit.campaigns.update mailkit.campaigns.single.schedule mailkit.campaigns.schedule.list mailkit.campaigns.schedule.timezone mailkit.campaigns.schedule.cancel mailkit.campaigns.messages mailkit.campaigns.messages.last mailkit.campaigns.messages.test mailkit.campaigns.history
mailkit.mailinglist.list mailkit.mailinglist.create mailkit.mailinglist.delete mailkit.mailinglist.adduser mailkit.mailinglist.edituser mailkit.mailinglist.import mailkit.mailinglist.getstatus mailkit.mailinglist.unsubscribed mailkit.mailinglist.engagement mailkit.email.getstatus mailkit.email.getstatus.history mailkit.email.move mailkit.email.delete mailkit.email.unsubscribe mailkit.email.unsubscribe.getstatus mailkit.email.revalidate mailkit.email.topics mailkit.email.wipe
mailkit.sendmail mailkit.sendmail_mass mailkit.sendmail_mass.results mailkit.sendsms
mailkit.report mailkit.report.campaign mailkit.report.message mailkit.report.message.recipients mailkit.report.message.feedback mailkit.report.message.links mailkit.report.message.links.visitors mailkit.report.message.bounces mailkit.report.raw.messages mailkit.report.raw.bounces mailkit.report.raw.responses
mailkit.profile.emails.list mailkit.profile.queries.list
Event API mailkit.filemanager.upload mailkit.filemanager.list mailkit.filemanager.delete
PHP example 1 (Example of mailkit.mailinglist.list call) PHP example 2 (example of mailkit.campaigns.single.schedule call) PERL example of mailkit.mailinglist.adduser call
Search

mailkit.sendmail_mass

Send message using an existing campaign to multiple recipients.

API call example:

JSON

{
    "function": "mailkit.sendmail_mass",
    "id": "client_id",
    "md5": "client_md5",
    "recipients": [
        {
            "send_to": "email@email.eu",
            "mailinglist_id": 123456,
            "campaign_id": 123456,
            "subject":"Message subject",
            "message_data":"base64 encoded message body",
            "create_email":true,
            "customs": {
                "first_name": "First name",
                "last_name": "Last name",
                "custom1": "custom field",
                "custom2": "custom field"
            },
            "content": {
                "var1": "variable content"
            },
            "attachment": [
                {
                 "url": "URL of attachment nr. 1",
                 "name": "name of attachment nr. 1",
                 "data": "data of attachment nr. 1(base64)"
                },
                 {
                 "url": "URL of attachment nr. 2",
                 "name": "name of attachment nr. 2",
                 "data": "data of attachment nr. 2(base64)"
                }
            ]
        },
        {
            "send_to": "email2@email2.eu",
            "mailinglist_id": 123456,
            "campaign_id": 123456,
            "subject":"Message subject",
            "message_data":"base64 encoded message body",
            "create_email":true,
            "customs": {
                "first_name": "First name",
                "last_name": "Last name",
                "custom1": "custom field",
                "custom2": "custom field"
            },
            "content": {
                "var1": "variable content"
            },
            "attachment": [
                {
                 "url": "URL of attachment",
                 "name": "name of attachment",
                 "data": "data of attachment (base64)"
                }
            ]
        }
    ],
     "options" : {
        "id_send": "today"
    }    
}

XML

<?xml version="1.0"?>
<methodCall>
  <methodName>mailkit.sendmail_mass</methodName>
  <params>
    <param>
      <value>
        <int>client_id</int>
      </value>
    </param>
    <param>
      <value>
        <string>client_md5</string>
      </value>
    </param>
    <param>
        <value>
          <array>
            <data>
              <value>
                <struct>
                  <member>
                    <name>send_to</name>
                    <value>
                      <string>email@email.com</string>
                    </value>
                  </member>
                  <member>
                    <name>mailinglist_id</name>
                    <value>
                      <int>ID of mailing list</int>
                    </value>
                  </member>
                  <member>
                    <name>campaign_id</name>
                    <value>
                      <int>ID of campaign</int>
                    </value>
                  </member>
                  <member>
                    <name>subject</name>
                    <value>
                      <string>subject</string>
                    </value>
                  </member>
                  <member>
                    <name>message_data</name>
                    <value>
                      <string>content</string>
                    </value>
                  </member>
                  <member>
                    <name>create_email</name>
                    <value>
                      <string>TRUE</string>
                    </value>
                  </member>
                  <member>
                    <name>customs</name>
                    <value>
                        <struct>
                            <member>
                                <name>custom1</name>
                                <value>Custom field no.1</value>
                            </member>
                            <member>
                                <name>custom25</name>
                                <value>Custom field no.25</value>
                            </member>
                            <member>
                                <name>first_name</name>
                                <value>First name</value>
                            </member>
                            <member>
                                <name>last_name</name>
                                <value>Last name</value>
                            </member>            
                        </struct>
                    </value>
                  </member>                  
                  <member>
                    <name>attachment</name>
                    <value>
                      <array>
                        <data>
                          <value>
                            <struct>
                              <member>
                                <name>url</name>
                                <value>
                                  <string>url of attachment nr. 1</string>
                                </value>
                              </member>
                              <member>
                                <name>name</name>
                                <value>
                                  <string>name of attachment nr. 1</string>
                                </value>
                              </member>
                              <member>
                                <name>data</name>
                                <value>data of attachment nr. 1 in Base64</value>
                              </member>
                            </struct>
                          </value>
                          <value>
                            <struct>
                              <member>
                                <name>url</name>
                                <value>
                                  <string>url of attachment nr. 2</string>
                                </value>
                              </member>
                              <member>
                                <name>name</name>
                                <value>
                                  <string>name of attachment nr. 2</string>
                                </value>
                              </member>
                              <member>
                                <name>data</name>
                                <value>data of attachment nr. 2 in Base64</value>
                              </member>
                            </struct>
                          </value>
                        </data>
                      </array>
                    </value>
                  </member>
                  <member>
                    <name>content</name>
                    <value>
                      <struct>
                        <member>
                          <name>var1</name>
                          <value>
                            <string>variable</string>
                          </value>
                        </member>
                        <member>
                          <name>other_name</name>
                          <value>
                            <string>other name</string>
                          </value>
                        </member>
                      </struct>
                    </value>
                  </member>
                </struct>
              </value>
            </data>
          </array>
        </value>
    </param>
    <param>
        <value>
            <struct>
                <member>
                  <name>id_send</name>
                  <value>
                    <string>today</string>
                  </value>
                </member>
            </struct>
        </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.
send_to * = e-mail address of recipient
mailinglist_id * = ID of mailing list
campaign_id * = ID of campaign (only 1 campaign ID can be entered in 1 API call, i.e. the same campaign must be sent to all recipients)
subject = other subject of campaign (optional)
message_data (base64) = other content of message (optional)
create_email = add e-mail address to the mailing list:

  • TRUE = recipient address will be added if not present in the mailing list yet
  • FALSE = recipient address will not be added to the mailing list if not present and therefor no email will be sent

customs = recipient personalisation data (name, custom fields, etc.). Provided data will update the recipient's record in the mailing list (optional)

attachment = optional campaign attachment. There are two options how to add attachment(s) - referring to the url address where the attachment is located, or sending attachment data (base64 encoded). The attachment can only be attached to a transactional campaigns! If the attachment is used for a non-transactional message, the message will not be sent!

- url = attachment URL
- name = attachment filename
- data (base64) = attachment data

As mentioned above, you can send the attachment either by providing the URL where it is stored, eg on FTP, or you can base64 encode the attachment data and use it in the API call as the value for "data". However, you always need to use either "url" or "data". If you send values in both parameters ("url" and "data"), the value for "url" takes precedence and the value for "data" is ignored.

Attachment name (name):

  • if you fill in "url", e.g. use the value - "https://path_to_file/attachment_2.pdf" - and do not fill in the value for "name", the attachment file in the e-mail will be named "attachment_2.pdf"
  • if you fill in "url", e.g. use the value - "https://path_to_file/attachment_2.pdf" - and at the same time fill in the value for "name" - e.g. "Name sent via API", the attachment file in the email will be named "Name sent via API"
  • if you fill in "data" (i.e. send base64 encoded attachment data) and at the same time fill in a value for "name" - eg "Name sent via API", the attachment file in the email will be named "Name sent via API"
  • if you fill in "data" (ie send base64 encoded attachment data) and do not fill in a value for "name", the attachment file will be named "unnamed" in the email

content (base64) = variable content that gets stored in structures named shared (for key/value pairs), resp. data (for complex structures and arrays). Data from these structures can later be used in template using tags [% shared.VARIABLE_NAME -%], resp. [% data.STRUCTURE_NAME -%]. If an array of variables is passed in the content the individual values in the array are to be passed unenencoded.
id_send = using value "today" allows to merge subsequent deliveries into one single reporting delivery.
* required value

Successful call response:

JSON

{
    "list": [
        "email@email.eu",
        "email2@email2.eu"
    ],
    "data": "OK",
    "request_id": "123456",
    "error_status": 0
}

XML

<methodResponse>
  <params>
    <param>
    <value>
      <struct>
        <member>
          <name>data</name>
          <value>
            <string>OK</string>
          </value>
        </member>
        <member>
          <name>list</name>
          <value>
            <array>
              <data>
                <value>
                  <string>email@email.eu</string>
                </value>
                <value>
                  <string>email2@email2.eu</string>
                </value>
              </data>
            </array>
          </value>
        </member>
      </struct>
    </value>
    </param>
  </params>
</methodResponse>

Values

data = OK = campaign will be sent
list = list of recipients
request_id = Identifier of the request that can be used to retrieve results and possible errors that occurred during processing of the request.
error_status

  • 0 = succesfull request
  • 1+ = unsuccesfull request

Contact us

Let us know what your campaign objectives are and we'll create a plan that works for you.

+420 277 001 800
sales@mailkit.com


Processing of information provided using this form is governed by our Privacy Policy.

Required
Required
Required
Mailkit logo

A Czech emailing platform with its own infrastructure, that is a leader in international mailing distribution.

 

  • Features
  • Services
  • Resources
  • About us

services

  • Email Authentication
  • Agency Partnerships
  • Email Training
  • Inbox Brand Visibility
  • Deliverability

ReSOURCES

  • Knowledge Base
  • API documentation
  • Blog
  • Status
  • BIMI inspector
Logo Maawg
Logo Experience
Logo CSA
Logo Signal spam
Logo ISO-27001
Logo ISO-9001
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
© 2006-2022 Mailkit - All rights reserved