I am trying to add header to message sent via swift mailer.
$message = Swift_Message::newInstance($title)
->setFrom(array('[email protected]' => 'Name'))
->setTo(array($email => $email))
->setBody($content, 'text/html');
tried this, returns error
$message-> addTextHeader('List-Unsubscribe', $url_unsub);
This returns does nothing, but does not return error also
$headers = $message->getHeaders();
$headers->addTextHeader('List-Unsubscribe', $url_unsub);
$result = $mailer->send($message);
Any idea what to do?