private function setHeaderAttributes(array $mailHeader)
    {
        $mailHeader = array_filter($mailHeader, function ($property) {
            return property_exists($this, $property);
        }, ARRAY_FILTER_USE_KEY);

        foreach ($mailHeader as $property => $header) {
            $this->{$property} = $header;
        }
    }