- Issue created by @eelkeblok
- @eelkeblok opened merge request.
When building an email by adding MarkupInterface instances (most commonly, by calling t()) to the body array, this gives a different result than when using plain strings (and importantly, also a different result as with core Drupal mail or Mail System), in that the text from the body parts is stuck together, without any line ending in between.
Also note that the documentation for hook_mail states "An array of lines containing the message to be sent. Drupal will format the correct line endings for you." (emphasis mine).
$message['body'][] = t('This is the first line.');
$message['body'][] = t('This is the second line.');
When building the legacy mail, first render the markup items into a string, and then treat them the same way as a plain string (by putting them in a processed_text render element).
None.
None.
None.
Active
1.0
Code