lib/mail/Mail.php
public function addCustomArgs(
        $custom_args,
        $personalizationIndex = null,
        $personalization = null
    ) {
        if (current($custom_args) instanceof CustomArg) {
            foreach ($custom_args as $custom_arg) {
                $this->addCustomArg($custom_arg);
            }
        } else {
            foreach ($custom_args as $key => $value) {
                $this->addCustomArg(
                    $key,
                    $value,
                    $personalizationIndex,
                    $personalization
                );
            }
        }
    }
public function addCustomArgs(
        $custom_args,
        $personalizationIndex = null,
        $personalization = null
    ) {
        if (current($custom_args) instanceof CustomArg) {
            foreach ($custom_args as $custom_arg) {
                $this->addCustomArg($custom_arg);
            }
        } else {
            foreach ($custom_args as $key => $value) {
                $this->addCustomArg(
                    $key,
                    $value,
                    $personalizationIndex,
                    $personalization
                );
            }
        }
    }
public function addCustomArgs ( $ custom_args , $ personalizationIndex = null , $ personalization = null ) { if ( current ( $ custom_args ) instanceof CustomArg ) { foreach ( $ custom_args as $ custom_arg ) { $ this -> addCustomArg ( $ custom_arg ) ; } } else { foreach ( $ custom_args as $ key => $ value ) { $ this -> addCustomArg ( $ key , $ value , $ personalizationIndex , $ personalization ) ; } } }
Adds multiple custom args to a Personalization or Mail object

If you don't provide a Personalization object or index, the
custom arg will be global to entire message. Note that
custom args added to Personalization objects override
global custom args.

@param array|CustomArg[] $custom_args Array of CustomArg objects
or key/values
@param int|null $personalizationIndex Index into an array of
existing Personalization
objects
@param Personalization|null $personalization A pre-created
Personalization object
Adds multiple custom args to a Personalization or Mail object