'Bulk sending to multiple recipients docusign php

Good morning, I'm trying to send a document to multiple recipients, but it's only sending to one, and it doesn't generate any error!

$signers = [];
    # Create the signer recipient model
    $signer1 = new \DocuSign\eSign\Model\Signer([
        'email' => $this->email_signatario, 'name' => $this->nome_signatario,
        'recipient_id' => "1", 'routing_order' => "5"]);

    array_push( $signers, $signer1 );

    $routing_order_count = 6;

    foreach ( $this->emails_adicionais as $endereco_adicional ) {
      $signer = new \DocuSign\eSign\Model\Signer([
        'email' => $endereco_adicional, 'name' => $this->nome_signatario . "_$routing_order_count",
        'recipient_id' => $routing_order_count, 'routing_order' => $routing_order_count]);

        array_push( $signers, $signer );
        $routing_order_count++;
    }$sign_here1 =  new \DocuSign\eSign\Model\SignHere([
        'anchor_string' => '*signature_1*', 'anchor_units' => 'pixels',
        'anchor_y_offset' => '10', 'anchor_x_offset' => '20']);
    $sign_here2 =  new \DocuSign\eSign\Model\SignHere([
        'anchor_string' => '/sn1/', 'anchor_units' =>  'pixels',
        'anchor_y_offset' => '10', 'anchor_x_offset' => '20']);

    # Add the tabs model (including the sign_here tabs) to the signer
    # The Tabs object wants arrays of the different field/tab types
    foreach ( $signers as $signer ) {
      $signer->setTabs( new \DocuSign\eSign\Model\Tabs([
        'sign_here_tabs' => [$sign_here1, $sign_here2]]));
    }



    # Add the recipients to the envelope object
    $recipients =  new \DocuSign\eSign\Model\Recipients([
        'signers' => $signers, 'recipient_count' => count( $signers ), 'carbon_copies' => [$cc1,$cc2,$cc3,$cc4]]);
    $envelope_definition->setRecipients($recipients);

This is the code I use to add signers and copies.

If anyone has an example of multiple submissions, please send them, thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source