function swiftmailer_add_path_header in Swift Mailer 7
Adds a path header to a message.
Parameters
Swift_Message $message: The message which the path header is to be added to.
string $key: The header key.
string $value: The header value.
1 call to swiftmailer_add_path_header()
- SWIFTMailSystem::mail in includes/
classes/ SWIFTMailSystem.inc - Sends a message composed by drupal_mail().
File
- includes/
helpers/ conversion.inc, line 321 - This file contains conversion functions.
Code
function swiftmailer_add_path_header(Swift_Message $message, $key, $value) {
// Remove any already existing header identified by the provided key.
swiftmailer_remove_header($message, $key);
// Add the header.
$message
->getHeaders()
->addPathHeader($key, $value);
}