What does your schema look like? Does this return all the different names from your repeating field with the name in it? 'Cause when I tried it in a demo, I just got the first name in my group (which is what I would expect, actually).
Here is a post that I read recently that explains a way to concatenate the data from a repeating group: http://www.infopathdev.com/forums/p/7124/30286.aspx#30286
Modified for my data structure (and without the conditional element), the formula looked like this:
eval(eval(RepeatingGroup, 'concat(my:TextField, " -- ")'),"..")
This returns all the values of the field my:TextField separated by a space, two dashes and another space. The only thing is -- it leaves those spaces and dashes hanging off the end of the last item! Not very pretty. However, with a little substring magic:
substring(eval(eval(RepeatingGroup, 'concat(my:TextField, " -- ")'),".."), 1, string-length(eval(eval(RepeatingGroup, 'concat(my:TextField, " -- ")'),"..") - 4)
The substring is taking the string created by the first formula, and, starting at the first character, returning the length of that string less 4 (the final space dash dash space bit).
Now, if you were to replace group5 in your formula with the first formula (inserting your group5 field in for RepeatingGroup and typing in your field name with the names for my:TextField) it would return a string of names separated spaces and dashes. Of course, you can modify the separator. You may want to try this formula out in another field in your form before putting it in the subject line on your email submit connection -- it will be easier to troubleshoot.
Hilary Stoupa / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge