well, you don't.
what you can do is:
$mail = "hello";
foreach(){
yada, yada, yada;
$mail .= "your foreach values here"; //this will add values to the $mail
}
//After the loop you can add more to $mail by:
$mail .= "wuzzup";
// Then you will end up with
$mail = "hello (all the stuff from foreach loop) wuzzup";
You cannot run any script inside a string definition