Get the name of all the Items of cart in current session

Here shows only the loop parts of the code

Since I don’t know what is the data structure of $session_data.

  1. I suppose $session_data[$key] return a product name first in order to create the example.
  2. Because you are creating a custom email, I assume HTML email is supported.
// examples to show how to correctly loop the data with separation
$data="";
foreach (WC()->session->get('cart') as $key => $value) {
      $data .= $session_data[$key] . ', ';
}

echo $data; // output something or put $data to somewhere to use