Adds a custom header to the mail
@param string $key
@param string $value
@return sFire\Mail\Mail
6901
public function addHeader($key, $value) {

		if(false === is_string($key)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
		}

		if(false === is_string($value)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
		}

		if(false === isset($this -> headers['custom'])) {
			$this -> headers['custom'] = [];
		}

		$this -> headers['custom'][$key] = $value;
	}
137863
public function setHeader($key, $value)
    {
        $this->_headers[$key] = $key.': '.$value;
        $this->setopt(CURLOPT_HTTPHEADER, array_values($this->_headers));
    }
15015
public function addHeaderIfNotExist(string $name, string $value) : self
    {
        $name = $this->normalizeHeader($name);
        if (isset($this->headers[$name])) {
            return $this;
        }

        $this->headers[$name] = $value;

        return $this;
    }
375419
public function addHeader(string $header, string $value): self
    {
        $this->headers[$header] = $value;

        return $this;
    }
318103
public function add($key, $value)
    {
        if (!$key) {
            return $this;
        }

        $this->param[$key] = $value;

        return $this;
    }
422629
public function addAdditionalHeader(string $key, string $value): self
    {
        $this->additionalHeaders[$key] = $value;

        return $this;
    }
648821
public function setHeader($key, $value)
    {
        $key = strtolower($key);
        $this->headers[$key] = $value;
    }
501580
public function withHeader($key, $value, $replace = true)
    {
        return $this->header($key, $value, $replace);
    }
495130
public function addDefaultHeader($name, $value)
    {
        if (!isset($this->headers[$name])) {
            $this->headers[$name] = $value;
        }

        return $this;
    }
132901
public function withHeader(string $name, string $value)
    {
        $this->defaultHeaders[$name] = $value;

        return $this;
    }
1189221
public function setHeader($header, $value = null)
    {
        if (is_string($header)) {
            $this->headers[$header] = $value;
        }

        return $this;
    }
11631
public function withHeader(string $key, string $value): void
    {
        $this->headers[$key] = $value;
    }
323187
public function withHeader($header, $value)
    {
        // Normalize the header names.
        $header = trim($header);
        $name   = strtolower($header);

        // Create a clone and set the given header in the clone.
        $new = clone $this;

        $new->headerNames[$name] = $header;
        $new->headers[$header]   = (array) $value;

        return $new;
    }
989621
public function addHeader($key, $value) {
		if (is_array($value)) {
			foreach ($value as $v) {
				$this->addHeader($key, $v);
			}
		} else {
			$this->headers[$key][] = $value;
		}
		return $this;
	}
1105629
public function header($key, $value = null)
	{
		if( is_null($value) )
		{
			$pos = strpos($key, ":");
			if( ! $pos )
			{
				return $this;
			}

			$value = substr($key, $pos + 1);
			$key = substr($key, 0, $pos);
		}
		$this->headers->set($key, $value);
		return $this;
	}
716808
public function addHeader($key, $value = null)
    {
        //if it's an array
        if (is_array($key)) {
            //warning this overwrites existing headers
            $this->headers = $key;
            return $this;
        }

        //if the value is null
        if (is_null($value)) {
            $this->headers[] = $key;
            return $this;
        }

        //else it should be key value
        $this->headers[] = $key . ': ' . $value;
        return $this;
    }
1221310
public function setHeader(string $header, string $value)
  {
    $found = false;
    # Traverse the headers, searching for a matching header (case insensitive)
    foreach ( $this->headers as $idx => $oldValue )
    {
      if (strcasecmp($this->headers[$idx],$header)==0)
      {
        # Found the header, now replace the value
        $found = true;
        $this->headers[$idx] = $value;
        break;
      }
    }
    # Add the header
    if (!$found) {
      $this->headers[$header] = $value;
    }

    return $this;
  }