lib/mail/Mail.php
public function addHeaders(
        $headers,
        $personalizationIndex = null,
        $personalization = null
    ) {
        if (current($headers) instanceof Header) {
            foreach ($headers as $header) {
                $this->addHeader($header);
            }
        } else {
            foreach ($headers as $key => $value) {
                $this->addHeader(
                    $key,
                    $value,
                    $personalizationIndex,
                    $personalization
                );
            }
        }
    }
public function addHeaders(
        $headers,
        $personalizationIndex = null,
        $personalization = null
    ) {
        if (current($headers) instanceof Header) {
            foreach ($headers as $header) {
                $this->addHeader($header);
            }
        } else {
            foreach ($headers as $key => $value) {
                $this->addHeader(
                    $key,
                    $value,
                    $personalizationIndex,
                    $personalization
                );
            }
        }
    }
public function addHeaders ( $ headers , $ personalizationIndex = null , $ personalization = null ) { if ( current ( $ headers ) instanceof Header ) { foreach ( $ headers as $ header ) { $ this -> addHeader ( $ header ) ; } } else { foreach ( $ headers as $ key => $ value ) { $ this -> addHeader ( $ key , $ value , $ personalizationIndex , $ personalization ) ; } } }
Adds multiple headers to a Personalization or Mail object

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

@param array|Header[] $headers Array of Header 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 headers to a Personalization or Mail object