ResourcesAPI documentation

mailkit.sendmail_mass

Send message using an existing campaign to multiple recipients.

XML-RPC request must be sent in the format displayed below. 

NOTICE: Data must be Base64 encoded.

API call example:

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>template_file</name>
                    <value>
                      <string>template</string>
                    </value>
                  </member>
                  <member>
                    <name>create_email</name>
                    <value>
                      <string>TRUE</string>
                    </value>
                  </member>
                  <member>
                    <name>attachment</name>
                    <value>
                      <array>
                        <data>
                          <value>
                            <struct>
                              <member>
                                <name>url</name>
                                <value>
                                  <string>url of attachment</string>
                                </value>
                              </member>
                              <member>
                                <name>name</name>
                                <value>
                                  <string>name of attachment</string>
                                </value>
                              </member>
                              nebo
                              <member>
                                <name>data</name>
                                <value>data of attachment 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>
  </params>
</methodCall>
		

Values

client_id * = client ID can be found in your Mailkit account's menu Profile / Integration / API settings.

client_md5 * = MD5 code can be found in your Mailkit account's menu Profile / Integration / API settings.

send_to * = e-mail address of recipient

mailinglist_id * = ID of mailing list

campaign_id * = ID of campaign

subject = other subject of campaign (optional)

message_data (base64) = other content of message (optional)

template_file = other template of campaign (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

attachment = attachment of campaign (optional). It is possible to send url of attachment or data of attachment:

- name = name of attachment

- url = url of attachment

- data (base64) = data of attachment

content (base64) = variable content that will replace the defined variables in template using tag [% shared.VAR3 -%] or [% shared.OTHER_NAME -%] or in content editor using tag [VAR3] or [OTHER_NAME].

* required value

Successful call response:

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