Example PERL code

my $server_url = 'https://client.mailkit.eu/rpc.fcgi';
my $server = Frontier::Client->new('url' => $server_url, 'debug' => 1);

my $cid=Frontier::Client->int(6960001);    # Your client ID as displayed in Profile/Integration
my $mid=Frontier::Client->int(0);
my $camp=Frontier::Client->int(14);        # ID of the campaign to use
my $iul=Frontier::Client->int(117);        # Mailing list ID (when when adding recipient to mailing list)

my $email = "somebody\@example.com";       # Sender email

my $result = $server->call(
            'mailkit.sendmail',
            $cid,
            'client_md5_hash_here',        # MD5 hash as displayed in Profile/Integration
            $iul,
            $camp,
            {
               'send_to',$email,
               'content',                  # The following data is the content available for use in the template
               {
                  'company','Xland.CZ',
                  'test_data', 
                  [
                     {  
                        'name','Payment 1',
                        'desc','Example payment',
                        'amount','2000',
                        'vat','0'
                     },
                     {  
                        'name','Payment 2',
                        'desc','Example payment 2',
                        'amount','2000',
                        'vat','0'
                     },
                  ],

               },
            },
# Following part contains the information about the new recipient when adding to the mailing list.
            {
                'first_name', 'First Name',
                'last_name', 'Last Name',
                'email','Email',
                'status','active',              # Recipient status (active/unknown/temporary/permanent/unsub)
            },
            {
               'nick_name','Nick Name',
               'gender','male',                 # Gender of the recipient
               'phone','Phone',
               'mobile','Mobile',
               'fax','FAX',
               'street','Street',
               'city','City',
               'state','State',
               'country','Country',
               'zip','ZIP/Postal Code',
            },
            {
               'custom1','',                    # Field for custom data
               'custom2','',                    # Field for custom data
               'custom3','',                    # Field for custom data
            },
--------------------- one file --------------------------
            {
               'name','file_name',
               'data',"$base_64_data_attach",
            }
-------------------- more files --------------------------
            {
               'attachement',
               [
                  {
                     'name','file_name1',
                     'data',"$base_64_data_attach1",
                  },
                  {
                     'name','file_name2',
                     'data',"$base_64_data_attach2",
                  }
               ]
            }
---------------------------------------------------------------
            );