You are here

protected function SwiftMailer::getApplicableCharset in Swift Mailer 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Mail/SwiftMailer.php \Drupal\swiftmailer\Plugin\Mail\SwiftMailer::getApplicableCharset()

Returns the applicable charset.

@internal

Parameters

array $message: The message for which the applicable charset is to be determined.

Return value

string A string being the applicable charset.

1 call to SwiftMailer::getApplicableCharset()
SwiftMailer::mail in src/Plugin/Mail/SwiftMailer.php
Sends a message composed by drupal_mail().

File

src/Plugin/Mail/SwiftMailer.php, line 515

Class

SwiftMailer
Provides a 'Swift Mailer' plugin to send emails.

Namespace

Drupal\swiftmailer\Plugin\Mail

Code

protected function getApplicableCharset(array $message) {

  // Check if a charset has been provided particularly for this message. If
  // that is the case, then apply that format instead of the default format.
  return $message['params']['charset'] ?? $this->config['message']['character_set'];
}