Skip to content
Snippets Groups Projects
Commit 83a6d8b3 authored by Wayne Eaker's avatar Wayne Eaker
Browse files

Issue #3375366: Don't automatically generate plain text version

parent 6be42a39
Branches release/1.3
Tags 1.2.0
No related merge requests found
......@@ -151,7 +151,7 @@ class SymfonyMailer implements MailInterface, ContainerFactoryPluginInterface {
// Determine if a plain text alternative is required. The message parameter
// takes priority over config. Support the alternate parameter 'convert'
// for back-compatibility.
$generate_plain = TRUE; //$message['params']['generate_plain'] ?? $message['params']['convert'] ?? $this->config['message']['generate_plain'];
$generate_plain = !empty($message['params']['generate_plain']) || !empty($message['params']['convert']);
if ($generate_plain && empty($message['plain']) && $is_html) {
// Generate plain text alternative. This must be done first with the
......
......@@ -65,5 +65,6 @@ function symfony_mailer_lite_mail($key, &$message) {
$message['body'] = array_map(function ($text) {
return \Drupal\Core\Render\Markup::create($text);
}, $text);
$message['params']['generate_plain'] = TRUE;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment