I want to send an email with the data of a foreach loop but I don't know how to get the data into the email body.
that's my current code
...
...
foreach($cartItems as $cartItem) {
'<strong>' . $cartItem->Amount . 'x ' . $cartItem->Title . '</strong>' . '<span>' . $cartItem->Price . ' €/St. insgesamt ' . $cartItem->Sum . '</span><br>';
}
...
...
$messageBody = "
foreach() Content should be here
";
$email->setBody($messageBody);
...
...
can someone help me?
thank you in advance