public static function Conversion::swiftmailer_add_date_header in Swift Mailer 8
Same name and namespace in other branches
- 8.2 src/Utility/Conversion.php \Drupal\swiftmailer\Utility\Conversion::swiftmailer_add_date_header()
Adds a date header to a message.
Parameters
\Swift_Message $message: The message which the date header is to be added to.
string $key: The header key.
string $value: The header value.
1 call to Conversion::swiftmailer_add_date_header()
- SwiftMailer::mail in src/
Plugin/ Mail/ SwiftMailer.php - Sends a message composed by drupal_mail().
File
- src/
Utility/ Conversion.php, line 188
Class
- Conversion
- @todo
Namespace
Drupal\swiftmailer\UtilityCode
public static function swiftmailer_add_date_header(Swift_Message $message, $key, $value) {
// Remove any already existing header identified by the provided key.
static::swiftmailer_remove_header($message, $key);
// Add the header.
$message
->getHeaders()
->addDateHeader($key, $value);
}