public function setHeader($name, $value)
    {
        $headerSet = $this->getSwiftMessage()->getHeaders();

        if ($headerSet->has($name)) {
            $headerSet->remove($name);
        }

        foreach ((array)$value as $v) {
            $headerSet->addTextHeader($name, $v);
        }

        return $this;
    }
public function setHeader($name, $value)
    {
        $headerSet = $this->getSwiftMessage()->getHeaders();

        if ($headerSet->has($name)) {
            $headerSet->remove($name);
        }

        foreach ((array)$value as $v) {
            $headerSet->addTextHeader($name, $v);
        }

        return $this;
    }
public function setHeader ( $ name , $ value ) { $ headerSet = $ this -> getSwiftMessage ( ) -> getHeaders ( ) ; if ( $ headerSet -> has ( $ name ) ) { $ headerSet -> remove ( $ name ) ; } foreach ( ( array ) $ value as $ v ) { $ headerSet -> addTextHeader ( $ name , $ v ) ; } return $ this ; }
Sets custom header value to the message.
@param string $name header name.
@param string|array $value header value or values.
@return $this self reference.
@since 2.0.6
Sets custom header value to the message .