Render Twig in hook_mail() I want to render twig when sending email (if it is possible) or include a template.

My code is like so:

/**
 * Implements hook_mail().
 */
function reg_email_mail($key, &amp;$message, $params) {
  $options = array(
    'langcode' =&gt; $message['langcode'],
  );

  switch ($key) {
    case 'new_user':
      $message['from'] = \Drupal::config('system.site')-&gt;get('mail');
      $message['subject'] = t('User created: @title', array('@title' =&gt; $params['title']), $options);
      $message['body'][] = \Drupal\Core\Mail\MailFormatHelper::htmlToText($params['message']);
      break;
  }
}


I'd like to change $params['message'] or part of this with twig. Is it possible?
$body_data = [
  '#theme' =&gt; 'something',
  '#somearg1' =&gt; 'somevalue1',
  '#somearg2' =&gt; 'somevalue2',
];
$body_content = \Drupal::service('renderer')-&gt;render($body_data);
$message['body'] = explode("\n", $body_content);