public static function Conversion::swiftmailer_get_headertype in Swift Mailer 8
Same name and namespace in other branches
- 8.2 src/Utility/Conversion.php \Drupal\swiftmailer\Utility\Conversion::swiftmailer_get_headertype()
Determines the header type based on the a header key and value.
Parameters
string $key: The header key.
string $value: The header value.
Return value
string The header type as determined based on the provided header key and value.
1 call to Conversion::swiftmailer_get_headertype()
- SwiftMailer::mail in src/
Plugin/ Mail/ SwiftMailer.php - Sends a message composed by drupal_mail().
File
- src/
Utility/ Conversion.php, line 28
Class
- Conversion
- @todo
Namespace
Drupal\swiftmailer\UtilityCode
public static function swiftmailer_get_headertype($key, $value) {
if (static::swiftmailer_is_id_header($key, $value)) {
return SWIFTMAILER_HEADER_ID;
}
if (static::swiftmailer_is_path_header($key, $value)) {
return SWIFTMAILER_HEADER_PATH;
}
if (static::swiftmailer_is_mailbox_header($key, $value)) {
return SWIFTMAILER_HEADER_MAILBOX;
}
if (static::swiftmailer_is_date_header($key, $value)) {
return SWIFTMAILER_HEADER_DATE;
}
if (static::swiftmailer_is_parameterized_header($key, $value)) {
return SWIFTMAILER_HEADER_PARAMETERIZED;
}
return SWIFTMAILER_HEADER_TEXT;
}